FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Child object - unchanged trans

3 posters

Go down

Child object - unchanged trans Empty Child object - unchanged trans

Post  _-MADMAN-_ Tue May 19, 2009 8:17 am

Hi,

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

Back to top Go down

Child object - unchanged trans Empty Re: Child object - unchanged trans

Post  sio2interactive Tue May 19, 2009 2:14 pm

Check tutorial14
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Child object - unchanged trans Empty Re: Child object - unchanged trans

Post  _-MADMAN-_ Wed May 20, 2009 4:00 am

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 scratch Can You explain me that topic like for idiot? Laughing

_-MADMAN-_

Posts : 52
Join date : 2009-04-23

Back to top Go down

Child object - unchanged trans Empty Re: Child object - unchanged trans

Post  Don Jaffa Wed May 20, 2009 5:37 am

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

Back to top Go down

Child object - unchanged trans Empty Re: Child object - unchanged trans

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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