Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to always recenter camera to a given position and rotation

Discussion in 'VR' started by elliot_eserin, Apr 19, 2022.

  1. elliot_eserin

    elliot_eserin

    Joined:
    Jan 5, 2020
    Posts:
    38
    I wasnt sure how to phrase the title but this is what I want:

    My game doesn't really require that you move around or interact with too much as you are the pilot in a plane, and I think it would work better if the camera always recentered - when holding down the oculus button - to the same position regardless of your position in the real world.
    To explain a bit better here is an example: Currently, when I am sitting in my chair with the oculus headset on, my head is the height I want to be in the game - as its a cockpit, I want it fairly centered. But if I stand up, my head is outside the cockpit, and even recentering it only aligns the direction I am facing.
    What I would really like is: Sitting, great. But If I stand up, and then hold the oculus button to recenter, it positions my head back to the same height as if I was sitting down.
    And to take it one step further, it would be great if I could lie down on the floor, looking up at the ceiling, recenter the view and it align my direction and position as though I were just sitting down in my chair looking forward - that desired position and rotation.
    Does that make sense? Is that possible? and if so, how would it best be done?

    Thanks