Game Development Community

[solved]I want to disable player-player collision, how can I do it?

by Johnathan Moore · in Torque 3D Professional · 01/01/2013 (8:22 pm) · 4 replies

Hello. I want to disable player-player collision.
I found something to do with a function "setCollisionLayers()", but I can't find it in the engine anymore.

Script or C++ is fine.

#1
01/02/2013 (4:36 am)
i also do not know that type function.
but a thougt:
u can try by setting smaller boundingBox on artdatablocksplayer.cs
boundingBox = "0.65 0.75 1.85";


[edit]
sorry.my mistake. it is "player-player ".that means u want to disable player collission with another player.in that case i belive there may be better solution than bounding box.but i do not know.
#2
01/02/2013 (7:14 am)
Go to player.cpp and remove PlayerObjectType from the collision move mask.
#3
01/02/2013 (8:51 am)
I like Ivan's solution - but even better would be to make that collision mask accessible from script so you could change it on the fly....

[edit]
On further examination I see that's a static variable, so perhaps script access is less of a good thing. Maybe some modification to have a per-instance override to that mask....
#4
01/03/2013 (7:11 am)
Thanks guys. Ians solution worked.