Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Rotate Camera to face an object

Discussion in 'Scripting' started by saifshk17, Oct 15, 2018.

  1. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    485
    Hello,

    How do I rotate the camera to face the object at all times irrespective of the camera's rotation? The camera is a VR camera that has fluctuating rotation values. How do I use quaternion or euler angles to achieve the above?

    Thank you
     
  2. Jimbo_Slice

    Jimbo_Slice

    Joined:
    Oct 1, 2015
    Posts:
    44
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    HOLD UP.

    You're saying that, if the user turns their head, you want to cancel that rotation entirely and just have the camera stay facing the object? That is going to cause MASSIVE motion sickness in your users. The single biggest motion sickness rule is, do NOT rotate the player.
     
    saifshk17 likes this.
  4. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    485
  5. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    485
    Not exactly. I am using fade in/out to change the players position. I want to rotate the player at one point ONLY ONCE. I am a VR developer so I know that I do not want to cause motion sickness :p