Translation relative to a certain rotation

maybe this post will help you get where you made mistake:

Here is example that could help you. When i look at this example, there is similar thing you want to achieve.

No, this is the example I started with. He rotates the observer, and that’s what results in my problem.

above code you post is from that is part of jme3-vr right?

can you show your Code?

Ive never used VR so I apologize if im missing any key aspect of how VR works and if my perspective is ignorant.

But is it possible to instead have the players location always be the same as the headset (or a child of the headset node)

It seems strange that youd want the observer position and the headset to move independently from one another - unless you are talking about only offsetting the node a very slight amount so it represents the eyes.

Wouldn’t you want to instead use the headset to detwrmine the location of the player model, and offset it slightly forward and towards the ground (i.e. away from the eyes/headset loc which is predetermined from the vr headset)

If that’s what you are doing, then are you sure you aren’t offsetting the observerNode by too much? I am am guessing that your observerNode represents the center point of the player, and the observer represents the location of the eyes/headset? If the offset is too far, then that would explain why you’re clipping through walls when you rotate left/right. My game is not vr, but I have ran into the same issue with headNodes clipping through walls when mproperly offset from the center point of the model when it rotates.

The observer is used a lot throughout jme-vr’s code. It deals with moving the camera and acts like a parent by combining the observer’s transform and the headsets transform. I’m looking into removing the observer entirely because it looks as if it’s optional. The observer originally represents the players location, but I offset it so that the observerNode follows the headset perfectly.

*Edit I’ve removed any instance of the observer and the game still starts, now I need to look into how to move the camera itself.