Author Topic: dummy  (Read 3973 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: dummy
« Reply #15 on: August 06, 2011, 12:41:44 pm »
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.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: dummy
« Reply #16 on: August 06, 2011, 12:54:32 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: dummy
« Reply #17 on: August 06, 2011, 12:58:17 pm »
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.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: dummy
« Reply #18 on: August 06, 2011, 01:05:35 pm »
oh now I understand, thanks for patience :)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: dummy
« Reply #19 on: August 06, 2011, 03:46:30 pm »
Is possible do it if I have these two dummies? (with "correct" position and rotation)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: dummy
« Reply #20 on: August 06, 2011, 09:38:32 pm »
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.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: dummy
« Reply #21 on: August 07, 2011, 10:53:51 am »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: dummy
« Reply #22 on: August 08, 2011, 07:53:28 pm »
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.