Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
lis8910's avatar
lis8910
Honored Guest
12 years ago

Follow Orientation

Hi,

I'm trying to make the rift camera follow the orientation of another gameobject.
However when i use the follow orientation option it completely ignores any default orientation I've set for the camera object, causing the camera to be pointed at the back of the object.
Is this an issue caused by an error in exporting the gameobject model or is there something obvious I'm missing?

My current fix is an empty gameobject as a child of the object i actually want to follow with a 180 rotation on the y axis

8 Replies

Replies have been turned off for this discussion
  • Gerald's avatar
    Gerald
    Expert Protege
    Follow orientation means that the objects orientation will be the new standard orientation of your camera and head movements will be relative to that new orientation.

    I am not entirely sure what it is you want to do.
  • lis8910's avatar
    lis8910
    Honored Guest
    In my example the gameobject i want to follow-rotate is a spaceship
    but as soon as i start the game the camera is facing towards the rear of the spaceship
    i want the camera to point towards the front...
    So it'd seem logical to rotate the camera 180 on the y axis...but that has no effect
  • Gerald's avatar
    Gerald
    Expert Protege
    so when your spaceship turns, so does your camera ... not how it is supposed to work. I do have a similar situation in Licht, I just have my normal camera follow my orb in Licht with a standard Mouse Orbit script, then I piggyback the Oculus Cam on it.
    But my camera is always looking into the same direction. If you want it to really follow it your spaceship, you might want to have the normal camera "lookat" your spaceship and then follow the orientation of that camera with your oculus cam.
  • Caine's avatar
    Caine
    Honored Guest
    Do you possibly have a mouse look script enabled on either of the objects? When I have mine enabled for testing purposes so I can look around until my rift arrives it will start the scene looking the wrong way, but when I disable the mouse look script all is good.
  • Reviving this thread because I am having a similar issue.

    I have a helicopter and when it moves and turns, I obviously want the OVR Camera to follow suit, so it's always oriented to the front, but the player can still look around.

    However, when I do so, the camera is forced to face toward the back of the heli instead of toward the front. is there a way to use Follow orientation, but reverse the rotation on the Y axis?

    EDIT: Pretty sure this has to do with the model I'm using. the front is not facing the right way, so I just used a roundabout way to fix it.
  • Can you re-export the model with a 180 rotation in the facing direction?

    Otherwise you can probably create an empty game object and place the heli and the OVRCameraController as children and have the heli rotated 180.

    Hope that helps.