rotating objects

View previous topic View next topic Go down

rotating objects

Post  DumbGames on 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

View user profile

Back to top Go down

Re: rotating objects

Post  meteors on 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
avatar
meteors

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

View user profile

Back to top Go down

thanks a lot

Post  DumbGames on 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

View user profile

Back to top Go down

Re: rotating objects

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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