Hi im trying to add a collision solid to a cube. And i figure the best way to do that is to use the CollisionBox and have it surround my cube. But I am having troubles. For some reason im getting this huge infinitely large box around my cube.
I know that this creates a collision box:
CollisionBox (float cx, float cy, float cz, float x, float y, float z)
But I dont think im putting in the correct numbers. Can someone here please put into detail what those numbers mean
Without checking the documentation or coude:
cx, cy, cz: center of the cube
x, y, z: either half extents or full extents
In order to get a 2 by 3 by 4 cube you would insert:
CollisionBox(0, 0, 0, 2, 3, 4)
hi, I tried creating a box using CollisionBox(0, 0, 0, 2, 3, 4) but strange thing is the box ends up being infinitely large. Same when I change the values to really small values such as CollisionBox(0,0,0,0.00001,0.00001,0.00001). Does anyone know why this is happening?
From the CollisionBox source:
// Description: Create the Box by giving a Center and distances of
// of each of the sides of box from the Center.
CollisionBox(const LPoint3f ¢er, float x, float y, float z)
// Description: Center as three separate co-ordinate points
CollisionBox(float cx, float cy, float cz, float x, float y, float z)
// Description: Create the Box by Specifying the Diagonal Points
CollisionBox(const LPoint3f &min, const LPoint3f &max)
Maybe the node you are parenting it to has a scale value also? Or are you testing by just parenting it to render?