[ODE] Basic question about dBodyGetRotation() and 2D angles

John Klimek jklimek at gmail.com
Wed Oct 18 05:37:44 MST 2006


Hmm, how do I convert a Euler angle to radians?

(eg. is a Euler angle a tradational angle that we learn about in high
school? :))

On 10/17/06, Jon Watte (ODE) <hplus-ode at mindcontrol.org> wrote:
> Why not use Euler angles? If you attempt to render something that's a 2D
> sprite, one of the Euler angles is what you want.
>
> Cheers,
>
>          / h+
>
>
>
> John Klimek wrote:
> > I'm trying to use ODE for 2D and I've been reading the example posted
> > on the Pop Cap forums.  I think my program ALMOST works but I'm having
> > a bit of trouble with the angles.
> >
> > Here's what I'm doing:
> >
> > const dReal* matrix;
> > matrix = dBodyGetRotation(myBody);
> >
> > dReal angle = atan2(matrix[0], matrix[1]);
> >
> > What I want is the Z angle of rotation.  I can't use Euler angles or
> > anything fancy.  My 2D graphics engine uses (0, 0) for the top-left
> > corner and whatever you specify for the bottom right corner (eg. 800,
> > 600).
> >
> > So can anybody help me out?
> >
> > Thanks in advance!
> > _______________________________________________
> > ODE mailing list
> > ODE at q12.org
> > http://q12.org/mailman/listinfo/ode
> >
> >
> >
>


More information about the ODE mailing list