Input:
else if (keyCode == KeyEvent.VK_M) {//keyReleased CODE
ironMan.prepareToFly = ironMan.fly = false;
System.out.println("Height before drop: "+ironMan.height);
ironMan.model.getRoot().translate(0, -ironMan.height, 0);
ironMan.height = 0.000f;
}
Logic:
else if (prepareToFly) {
model.animateSkin((frame+=.12f), 5);
model.getRoot().translate(0, (height+=((float)(-8f*deltaTime))), 0);
if (frame >= 1.00f) {
System.out.println("Total height: "+height);
prepareToFly = false;
fly = true;
}
}
else if (fly)
model.animateSkin((frame+=.12f), 2);
Result: ironMan drops far less than he flew up (stays above ground). But the println show identical values for ironMan.height. What gives?
I dont know ???
but I guess that is neither related to Bones nor jPCT. it is related to your game logic. there is nothing special with root of AnimatedGroup, it's just an ordinary jPCT object
How, though, when both println statements print the same value? Something's weird here.
Never mind. Sleeping pill talking. :- ) The problem could be found in the posted code (every iteration was moving the model by its current total and it got moved down a single time by that amount. Thanks for your time.