I am wondering how to make an inclined plane using ODE that a block will slide down. I don't want the plane to be infinite; ideally I want objects to fall off the edge of it so I probably actually need a large flat box. I know how to make basic objects like boxes, spheres, cylinders but am not sure how I can lock a box in place in mid-air? Or is it best to use a large triangular prism type shape which sits on the ground? I am using the ODE implementation built in to Panda3D game engine.
Asked
Active
Viewed 475 times
1 Answers
0
Please consult the ode documentation:
http://opende.sourceforge.net/wiki/index.php/Manual_(Collision_Detection)#Plane_Class
A plane can only be 'static' in ode so you don't need to lock it. The vector that you specify with the (a,b,c) parameters correspond to the normal of the plane. This would allow you to specify the orientation. For example (sqrt(2)/2,sqrt(2)/2,0) would be plane with a 45 degrees orientation in respect to having a Y up. The last param 'd' specifies the offset of the plane.
As for Panda3D, there is a wrapper for the plane class creation: http://www.panda3d.org/manual/index.php/Collision_Detection_with_ODE
The Vec4 param should correspond directly to the (a,b,c,d) parameter used by the ODE lower level.
I hope this helps.

crisbia
- 174
- 3
-
I think my question was badly worded and I have changed it. I don't want an infinite plane, I actually want a finite plane, so that for instance an object could fall off the side. Probably what I need is just a large flat block, but I don't know how to lock this in place in the air so that it doesn't just fall down to the ground. – eggbert Jul 20 '11 at 08:16
-
I haven't tried it myself on Panda3d, but I would think that the wrapper uses the same approach that ODE does. You can create a geometry, in your case probably an OdeBoxGeom object, and not attach it to a body. Have you tried that? In ODE, geometries without a body are static. – crisbia Jul 20 '11 at 23:50