I have a scene that's completely aligned with its SkyBox. Yet when I translate an object with mainGate.translate(0, -deltaTime, 0), it moves on what I think is the x/z plane. What gives?
Maybe your camera doesn't look down the z-axis but down the y-axis? Has the object been rotated?
Its parent has, why?
I see...due to the way in which the transformations of childs and parents are concatenated, this will actually rotate the child's object space coordinate system. You might want to try this instead:
SimpleVector ya=parent.getYAxis();
ya.scalarMul(deltaTime);
child.translate(ya);
I see, thank you. Does the fact that it worked confirm that the game is in fact in the x/z plane?
How do you feel about adding a removeParentButCommitTransformations() (or whatever you want to call it) method to Object3D?
Quote from: AGP on January 26, 2014, 10:28:59 PM
I see, thank you. Does the fact that it worked confirm that the game is in fact in the x/z plane?
Yes, all is fine then.
Cool. What about the method? Is that a possibility? You can clearly see how useful it would be (whenever you have multiple parts of a single set that need to be rotated and translated into place).
I'll look into something like that...