[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.
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, matrix);
> 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,
> So can anybody help me out?
> Thanks in advance!
> ODE mailing list
> ODE at q12.org
More information about the ODE