[ODE] Basic question about dBodyGetRotation() and 2D angles
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Tue Oct 17 16:01:33 MST 2006
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