auto rotation
3 posters
auto rotation
Hi ..
I'm trying to achieve a simple effect with an exported blender object where I want it to rotate about an axis (simple animation). I've tried using a simple thread to update the rotation parameters every few millisecs and it seems to hang the code. Is there any other way to do it ?
thanks in advance
I'm trying to achieve a simple effect with an exported blender object where I want it to rotate about an axis (simple animation). I've tried using a simple thread to update the rotation parameters every few millisecs and it seems to hang the code. Is there any other way to do it ?
thanks in advance
rajvikram- Posts : 4
Join date : 2009-01-10
Re: auto rotation
Put this right after your call to sio2ResourceRender:
my_object->_SIO2transform->rot->x += 2.0;
sio2TransformBindMatrix( my_object->_SIO2transform );
(where my_object is the name of your object and x is the axis to rotate on)
Best,
-j
my_object->_SIO2transform->rot->x += 2.0;
sio2TransformBindMatrix( my_object->_SIO2transform );
(where my_object is the name of your object and x is the axis to rotate on)
Best,
-j
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: auto rotation
Actually it should be called before, so you'll get the current rotation for the frame, putting it after will cause the rotation to be affected the next frame. That might cause problem if you are using physic or other time critical / variable critical operations.
Re: auto rotation
Awesome ... that worked great !! I just made a small mod to your suggestion .. same concept
_SIO2object->rot->x += 2.0;
sio2ObjectBindMatrix( _SIO2object);
_SIO2object->rot->x += 2.0;
sio2ObjectBindMatrix( _SIO2object);
rajvikram- Posts : 4
Join date : 2009-01-10
Similar topics
» Accelerometers rotation
» Widget rotation?
» Arcball Camera up/down rotation bug
» Rotation of rolling object is zero.
» Collision objects without rotation
» Widget rotation?
» Arcball Camera up/down rotation bug
» Rotation of rolling object is zero.
» Collision objects without rotation
Permissions in this forum:
You cannot reply to topics in this forum