I am currently making a fps game. I made the player node have the BetterCharacterControl, then I added a headNode as a child of the player node. The problem I have is that I can’t make only the head rotate, because either I set the camera as a child of headNode, and thus the rotation is forced by the player node, or I set the camera as parent of headnode(but this forces me to make a position loopback to the camera and this create weird effect when objects are attached the the headNode).
I also tried adding a camera node with the cameraToSpatial and the SpatialToCamera and its not doing what I want.
So, is there a way I can make the camera translate(so the headNode translate too) using the player node position and rotate using the camera rotation?
Also, putting translation in the update loop is not viable because the objects are not following fast enough(if I move right, my headnode and its childs is not keeping up and is having a left offset until I stop walking)
And then there is Control and AppState which also each have an equivalent to update() und render().
The update loop is big … with many places where you can inject your code.
And it depends on your code and the order in which you write commands.
And the code is open source - jME is a white box, not a black box - just download the code and set up an IDE project. Or if you prefer a black box then read the wiki and the javadoc.
simpleUpdate() is one of the very first things called. So any control updates, app state updates, etc. will happen after that. Some searching through the forum or code… or some logging can tell you when things happen in update.