Zay-ES AppState Order

Hello. Is there a proper way to attach AppStates to the stateManager so that they are order independent?

My physics is a bit wonky, I think it’s because my CharacterControl is attached after the PhysicsAppState is attached. But It has to due to initialization order.

All app state updates are run before controls are updated. I personally don’t use any controls for game logic so this doesn’t come up for me.

If you must have something in your app states run after controls are updated then you have to do it in appState.render()… but then realize that anything you do that the control would have depended on is now going to wait until the next frame.

1 Like

I’ve solved the issue. It wasn’t and order problem. It was a BulletPhysics issue. It wasn’t accurate enough and the player collisionshape was penetrating the terrain too much making the movements jittery as it was corrected.

Although I do have to place AppStates the use the playerEntityId after attached the GameAppState.