How to set up bounding boxes?
by William · in Torque 3D Beginner · 01/15/2015 (2:15 pm) · 9 replies
How would I set up a bounding box for Torque? Is it done within the Torque or do I have to import it from a .dae?
#2
01/16/2015 (5:10 am)
You can do either; construct the object via the TSShapeConstructor object(scripting)[or with the Shape Editor] or create the geometry in your modeling program and give it the naming convention of 'bounds'. That should create the object, parent it to your 'figure', it should follow the animations.
#3
01/16/2015 (6:13 am)
The box also needs to be large enough that it always encompasses your object through all animations - though the documentation suggests there is a way to set multiple bounds boxes depending on pose triggers (see the section on crouch/prone poses).
#4
01/16/2015 (9:53 am)
What are bounding boxes good for anyway? I noticed it works also without.
#5
01/16/2015 (2:18 pm)
Bounding boxes are used to simplify collisions and are also used as hitboxs in fps games.
#6
01/16/2015 (2:20 pm)
So you are talking only about the playermodel here?
#7
01/16/2015 (2:20 pm)
Without a bounding box physics has to be calculated per face. Bounding boxes are useful in many situations.
#8
01/16/2015 (2:40 pm)
That is not bounding box, that is the collisionmesh, which may in case of the player model be also the bounding box.
#9
Bounding boxes are also used to replace a mesh collider as it can reduce the number and type of physics checks required, it is often used as an optimisation technique but it depends on the case.
01/17/2015 (1:23 am)
@Duion - one can use bounding boxes to extend beyond the player model mesh thereby avoiding geometry clipping with the camera. Usually this requires messing around with the collision matrix so that the player is kept at a safe distance from geometry but bullets are still allowed to pass through the bounding box without having damage decals appear suspended in mid air. That's an oversimplification obviously.Bounding boxes are also used to replace a mesh collider as it can reduce the number and type of physics checks required, it is often used as an optimisation technique but it depends on the case.
Duion