rotating objects
2 posters
rotating objects
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
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
Re: rotating objects
//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
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- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
thanks a lot
thanks a lot
I was missing the bind matrix part!!! I was getting some weird results!
I was missing the bind matrix part!!! I was getting some weird results!
DumbGames- Posts : 16
Join date : 2008-12-03
Similar topics
» duplicating objects at runtime and changing textures on the duplicated objects
» Rotating SIO2Widget?
» Rotating an object that's an actor
» Rotating the Camera Around the Y-Axis
» Objects pushing through
» Rotating SIO2Widget?
» Rotating an object that's an actor
» Rotating the Camera Around the Y-Axis
» Objects pushing through
Permissions in this forum:
You cannot reply to topics in this forum