Game Development Community

Static object collisions

by Martin Banks · in Torque 3D Professional · 08/28/2009 (5:10 pm) · 4 replies

i have some static objects that I want to make collidable. I import them into my scene as TSStatic and they default to CollisionMesh with 'Allowplayerstep' set to true. However, my character walks right through them. The objects are placed in another TSstatic, which is a room, and it is set to Visiblemesh so that my character can walk around in it. What settings are wrong here?

#1
08/31/2009 (1:42 pm)
Ok, I've tried setting the object to a collision type of 'bounds'. This seems to work partially. The object is a rectangular cube. When I approach the object on its short side, my character's progress is halted, but when I approach on the object's long side, my character walks on top of it. I tried toggling the 'allowplayerstep' property with no visible difference in the behavior described.

I am also experiencing this 'walk-up-and-over behavior' with the room I have in the scene, in that the character approaches the walls and instead of being halted by them, instead walks up them and ends up above them stuck in the ceiling(ankles and feet below ceiling, remainder of the character above it on outside of room).

What am i missing?



#2
08/31/2009 (2:48 pm)
I have had good look with visible mesh. If you use collision mesh, but the object in question has not had a collision mesh added, you will be able to walk through it (I believe). All TSStatic have a visible mesh, I have never had trouble setting a TSStatic to visible mesh, so I would try to set both the building and the object within to visible mesh.

Apparently, using collision type of bounds is working for you , but you walk over it. I believe that problem can exist regardless of the collision type. It is a matter of the height and/or shape of the object. I am not sure of the best solution to this......however,

Jaimi McEntire just posted a new FXForceField resource in the forums. I believe you could use this sucessfully to approximate a collision mesh that would be too high for your character to walk over
#3
08/31/2009 (3:20 pm)
This walking over objects behavior seems inconsistent in that, being a rectangular volume, the height of the object is the same when approached from either axis (long or short), so it seems that if it halts the character's progress from the short side, then it should also be tall enough to halt the progress from its long side.

Using the visiblemesh setting, causes the character to stick to the objects in the room, as well as a dramatic performance hit while the collisions causing the sticking occur. Additionally, while this visiblemesh setting works well to enable the character to traverse a room realistically, when the character hits a wall, it ends up in the ceiling, as if it just walked up the wall.

I don't see anyone else experiencing this behavior though, so I am inclined to believe I am just missing a setting somewhere?



#4
08/31/2009 (7:43 pm)
Ok, I got it. In my playerdata derived datablock, I needed to set the maxStepHeight which prevented my character from 'stepping' up on objects that are above the stated height.