[ODE] Restricting a body to 2D

Jon Watte hplus-ode at mindcontrol.org
Fri Dec 10 09:32:35 MST 2004


An AMotor only restricts ROTATION, not movement. 
He needs the newly submitted L-motor. Google the archives 
for that patch (just a week or two old) and try it out.

There's also a Plane2D joint which you could look for.

Cheers,

			/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
Patrick McColgan
Sent: Friday, December 10, 2004 1:20 AM
To: ODE
Subject: Re: [ODE] Restricting a body to 2D


You want to be using the AMotor, its covered in the documentation and 
appears in one sample program.

For your needs EulerMode might do, so ODE will do the hard work.  Then 
set Hi and Lo stops on the axis as required, search the lists for more 
stuff.  I've found there to be issues with AMotors generally but as of 
this week have got them working the way I want them.

Good luck.

daniel åkerud wrote:

>
> 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
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list