Game Development Community

How large are Collision Bins?

by Cinder Games · in Torque Game Engine · 10/16/2005 (1:08 pm) · 4 replies

Read all the documentation i could find on bins... was curious if anyone knows how torque decides on the size of the bins and what not. Or if anyone can point me to more info. Thanks

#1
11/13/2005 (3:50 am)
*bump* I'm still curious how far torque attempts to check for collisions.
#2
11/13/2005 (5:59 am)
Quote:The Container splits up the world into cubes called bins. When an object is added to the scene, it's bounding-box is used to find which of these bins it belongs in. Basically it identifies a box in the world. If the object is too big then it gets put into a linear list called the overflow bin (where naughty objects go).

When you do a CastRay using the engine it basically checks which of these bins it intersects. It then calls all the objects in turn that reside in these bins. The objects can then do their own, perhaps more detailed, collision check that may be polygon perfect or just the bounding-box, it's entirely upto the object itself.
#3
11/13/2005 (6:18 pm)
Thanks for the info, but i've already read melv's description of bins. I'm mostly curious on how large these bins are. Like if im in the range on bin a, how far away until i'll bin in bin b. and so on.
#4
11/13/2005 (9:33 pm)
I think they're every eight or sixteen meters. If you care, why not skim over the Container code? That way you can be up on all the implementation details, too.