Main Menu

dummy

Started by Thomas., August 05, 2011, 07:25:03 PM

Previous topic - Next topic

EgonOlsen

But i've already explained that. You are making dummy a parent of dummy2, which nulls the translation for everything that is a child of dummy2.

Thomas.

I do not know what about you talking :) I just add child and does not any translation after dummy.addChild(dummy2); ... so when I add new child every previous translation and rotation of dummy are applied on child?

EgonOlsen

cube0 is a child of dummy2, inheriting it's transformations. dummy2 becomes a child of dummy, inheriting it's transformations. So the transformation is dummy->dummy2->cube0. And because dummy and dummy2 result in no transformation, you get the current results.

Thomas.

oh now I understand, thanks for patience :)

Thomas.

Is possible do it if I have these two dummies? (with "correct" position and rotation)

EgonOlsen

Sure. If the second child compensates for the translation of the first one. But i'm not sure if this is the right solution to your problem...which i don't know, so it might very well be.

Thomas.

All objects and their properties are loaded from xml. Every object (ex. car) can has more objects (for shoot, move, interaction and object visible on screen), these objects are in one array and every array has dummy. So I load elevator and control panel, that has in properties united movement with the elevator.

EgonOlsen

For your example, i'm not sure why you need multiple dummies then...anyway, you just have to make sure that your transformation chain gives you the results you want when chaining multiple transformations. You can create the wildest chains of transformations...it's totally up to you.