[SOLVED]Problem with tpf in AbstractAppState

JME 3.0

I’ve been testing some code for rotations. All goes as planned in when I’m using the update loop directly from the SimpleApplication. However when I run the code from an AbstractAppState the rotation goes haywire.

public void yaw(Spatial x,Float degree){
        degree = (float)0.01745329252 * degree;
        x.rotate(0, degree, 0);

I call it like so.


This works fine in SimpleApplication but just randomly spins about in AbstractAppState. The furthest I could narrow it down to is the tpf is jumping by huge amounts in AbstractAppState.

**** Solved , sorry found what was making the tpf jump so high.

Anything that others might benefit from?

1 Like

I was calling it in a loop that was meant to cycle through items and test if they where within the players range. Which was calling the rotation every pass. So not really.