Rotate object through global axis
2 posters
Rotate object through global axis
Hi there,
I really need to rotate an object through the global axis.
The transformation just let me rotate the object through their own axis:
I really apreciate if you can help me.
Thanks
I really need to rotate an object through the global axis.
The transformation just let me rotate the object through their own axis:
- Code:
object->_SIO2transform->rot->x += 90.0;
sio2TransformBindMatrix( _SIO2object->_SIO2transform );
I really apreciate if you can help me.
Thanks
andreassilva- Posts : 22
Join date : 2009-02-19
Re: Rotate object through global axis
Check tutorial14 to see how you can link another matrix to an SIO2transform, so you can have one matrix that move you object from the center then render it around its pivot point.
Cheers,
Cheers,
Re: Rotate object through global axis
Thanks for reply ,
but I didn't get what you meant to say, i guess.
here is my code
As you can see, in the commentated code, I tryed to do some parent but no success..
can you give me a simple example code please?
Thank you
but I didn't get what you meant to say, i guess.
here is my code
- Code:
/*SIO2object *_SIO2objectAux = ( SIO2object * )sio2ResourceGet( sio2->_SIO2resource,
SIO2_OBJECT,
"object/MatrixCube");
*/
SIO2object *_SIO2object = ( SIO2object * )sio2ResourceGet( sio2->_SIO2resource,
SIO2_OBJECT,
"object/Cube" );
//_SIO2object->_SIO2transform->_SIO2parent = _SIO2objectAux->_SIO2transform;
if( _SIO2object )
{
_SIO2object->_SIO2transform->rot->x += 30.0;
}
sio2TransformBindMatrix( _SIO2object->_SIO2transform );
//sio2TransformBindMatrix( _SIO2objectAux->_SIO2transform );
As you can see, in the commentated code, I tryed to do some parent but no success..
can you give me a simple example code please?
Thank you
andreassilva- Posts : 22
Join date : 2009-02-19
Re: Rotate object through global axis
- Code:
sio2TransformBindMatrix( _SIO2md2->_SIO2transform );
// Create a parent child relationship between the
// SIO2md2 and the SIO2object transformation used for collision.
_SIO2md2->_SIO2transform->_SIO2parent = sio2ResourceGetObject( sio2->_SIO2resource,
"object/yoshi" )->_SIO2transform;
Re: Rotate object through global axis
Well, that was what I concluded before (that's in the commentated code).
I need you to be more specific please:
-What to do in blender?
-Which object to rotate?
-Dont want to use md2 of course.
(btw, the code is in the Render function)
Thanks
I need you to be more specific please:
-What to do in blender?
-Which object to rotate?
-Dont want to use md2 of course.
(btw, the code is in the Render function)
Thanks
andreassilva- Posts : 22
Join date : 2009-02-19
Re: Rotate object through global axis
I need some help here please
andreassilva- Posts : 22
Join date : 2009-02-19
Similar topics
» How to rotate a object without changing the axis by SIO2?
» Camera rotate about y-axis
» how to not rotate around object
» Problem in tutorial 02 using my own model
» rotate a physics object?
» Camera rotate about y-axis
» how to not rotate around object
» Problem in tutorial 02 using my own model
» rotate a physics object?
Permissions in this forum:
You cannot reply to topics in this forum