Change Boundingbox to BoundingSphere
by Robert Stewart · in Torque Game Engine · 03/21/2005 (1:12 pm) · 11 replies
Is it possible for me to make the bounding box of my player, to become the shape of my players model? the model is a sphere. Thanks
Edit: Acually an even better idea, i found a function called boundingSphere. Could i replace BoundingBox with BoundingSphere? Ideas on how this would be done? Thanks for any help.
Edit: Acually an even better idea, i found a function called boundingSphere. Could i replace BoundingBox with BoundingSphere? Ideas on how this would be done? Thanks for any help.
About the author
#2
03/21/2005 (1:22 pm)
Sthephen what do you think about the extra question I edited in, I think I asked it after you posted.
#3
03/21/2005 (1:23 pm)
Hehe..we're both editing...honestly, after reviewing my answer, I realized that I'm not the correct person to give comments on the question..sorry!
#4
03/21/2005 (1:27 pm)
Haha, ok. Thanks for trying
#5
Collision is handled trough collision geometry. This can be any convex shape that is less than 30 polygons in density. You can also have 8 of these in your DTS shape by default (this can be extended in the engines options).
Player character collision data is handled through a collision box that is defined in the game engine in the server side player.cs file. The collision box evenly grows from the world of the DTS shape, which is the position of the bounds objects pivot point in your 3d application.
For more information on this subject you should read the Documentation here on GarageGames.
03/21/2005 (6:27 pm)
The "bounds" shape is simply a box and it defines the world of the character model to the exporter. Anything within the box gets exported, anything outside doesnt. Also because the bounds box defines the DTS objects world, it also defines the DTS shapes world origin and orientation inside the engie.Collision is handled trough collision geometry. This can be any convex shape that is less than 30 polygons in density. You can also have 8 of these in your DTS shape by default (this can be extended in the engines options).
Player character collision data is handled through a collision box that is defined in the game engine in the server side player.cs file. The collision box evenly grows from the world of the DTS shape, which is the position of the bounds objects pivot point in your 3d application.
For more information on this subject you should read the Documentation here on GarageGames.
#6
03/22/2005 (7:52 am)
Thanks for the info Foster, I didn't know that the collision geometry needed to be less than 30 polys.
#7
03/22/2005 (8:59 am)
I have no collision in my game, instead I have the bounding box been raycasted on. I would like to raycast a sphere instead of a box. Sorry if I dident understand your post Foster, but can this be done?
#8
03/22/2005 (9:09 am)
Yes, you can do that. If you create your own subclass of shapebase (or your own rendered object like with the fxrenderobject tutorial), you can overload the castRay function to check against a sphere (or anything you want).
#9
04/02/2005 (2:04 pm)
Josh is exactly right. The mathematical abstractions behind most of the collision systems can deal with almost any convex manifold. Pretty cool, eh? :)
#10
04/02/2005 (2:22 pm)
Is that all? What about the other collision-related functions, like buildConvex and getPolyList?
#11
04/02/2005 (11:52 pm)
Well, if you want those types of collision to be also spherical, you have to change them. If not, don't.
Torque 3D Owner Stephen Zepp