FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

rotating objects

2 posters

Go down

rotating objects Empty rotating objects

Post  DumbGames Tue Dec 09, 2008 11:52 pm

how do I do absolute rotations and translations (not relative to current state with 'translate' and 'applytorque')

I want to put an object (rigid body) at an absolute position (x,y,z) and rotate it to a known state, not change the rotation by a difference.

please help

DumbGames

Posts : 16
Join date : 2008-12-03

Back to top Go down

rotating objects Empty Re: rotating objects

Post  meteors Wed Dec 10, 2008 5:43 am

//move into position
my_object->pos->x = 3.0;
my_object->pos->x = 3.0;
my_object->pos->z = 3.0;

//rotate
my_object->rot->x = 90.0;

//bind the matrix so your translations take effect
sio2ObjectBindMatrix(my_object);


Hope this helps! Regards,
-joshua
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

rotating objects Empty thanks a lot

Post  DumbGames Wed Dec 10, 2008 9:49 am

thanks a lot
I was missing the bind matrix part!!! I was getting some weird results!

DumbGames

Posts : 16
Join date : 2008-12-03

Back to top Go down

rotating objects Empty Re: rotating objects

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum