Child object - unchanged trans
3 posters
Child object - unchanged trans
Hi,
I have relation:
Everything is ok, I see how child object "fallow" the parent.
Next step - bind emitter to child object:
And nothing happend - emitter is still in 0.0.0 position. Also I see, that child object disappear while camera do not look at initial position of helper. What is wrong with my code? How can I bind actual ogl transformation to internal object?
Regards,
Mad
I have relation:
- Code:
helper->_SIO2transform->_SIO2parent = player->_SIO2transform;
sio2TransformBindMatrix(helper->_SIO2transform);
Everything is ok, I see how child object "fallow" the parent.
Next step - bind emitter to child object:
- Code:
d_emitter->_SIO2transform->rot->x = helper->_SIO2transform->rot->x;
d_emitter->_SIO2transform->rot->y = helper->_SIO2transform->rot->y;
d_emitter->_SIO2transform->rot->z = helper->_SIO2transform->rot->z;
d_emitter->_SIO2transform->loc->x = helper->_SIO2transform->loc->x;
d_emitter->_SIO2transform->loc->y = helper->_SIO2transform->loc->y;
d_emitter->_SIO2transform->loc->z = helper->_SIO2transform->loc->z;
}
sio2TransformBindMatrix( d_emitter->_SIO2transform );
And nothing happend - emitter is still in 0.0.0 position. Also I see, that child object disappear while camera do not look at initial position of helper. What is wrong with my code? How can I bind actual ogl transformation to internal object?
Regards,
Mad
_-MADMAN-_- Posts : 52
Join date : 2009-04-23
Re: Child object - unchanged trans
I have studied totorial 14 and still can't find solution for my problem. Child object renders properly, same as md2 object in tut14, but his transformation are equal 0 - so any object binded to child doesn't move/rotate/whatever. I'm quite confused about what is rendered and what is calculated by engine Can You explain me that topic like for idiot?
_-MADMAN-_- Posts : 52
Join date : 2009-04-23
Re: Child object - unchanged trans
I had this problem, seems to me the engine doesn't like 2 layers of parenting - solved it by parenting everything to a ghost 'parent' object (though I realize this may not be applicable for your project).
Don Jaffa- Posts : 49
Join date : 2009-02-19
Similar topics
» physics object inside another physics object
» object selection
» how can move other object near
» Render 3D Object in GUI
» how to not rotate around object
» object selection
» how can move other object near
» Render 3D Object in GUI
» how to not rotate around object
Permissions in this forum:
You cannot reply to topics in this forum