[ODE] Restricting a body to 2D

daniel åkerud daniel.akerud at home.se
Fri Dec 10 02:45:17 MST 2004


i have a 3d world, with 3d objects colliding in plenty of 3d-ways - all  
thanks to ODE.

however,
i have a problem where i want one object to be restricted in a 2d plane.  
if a collision between this
object and another unrestricted 3d object occurs, the result should:

* NOT move the object in Y direction (Y is up for me)
* NOT give the object velocity in Y vector, only X and Z
* NOT make the object pitch and roll - only yaw
* NOT give the object a torque for Y and Z axis

i have seen that even if I directly zero out the forces and torques that  
are inappropriate, ODE has still moved my bodies some before i get  
control, just
to make the bodies go out of collision (i think that is the reason). this  
is correct right? anyway, that is why i have "duplicates" above.

so, can anyone give me some hints how to do this?
this is NOT a 2D application, and there will be many objects restricted to  
2D, but in different places so to speak. therefore, i don't know if the  
Plane2D joint can help me out (as it restricts Z=0, and he recommends  
using it for ODE 0.039 in the readme).

thanks,
apanjocko




More information about the ODE mailing list