Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Build Race in unity VR

Discussion in 'VR' started by orit_cohavi, Nov 18, 2018.

  1. orit_cohavi

    orit_cohavi

    Joined:
    Oct 15, 2018
    Posts:
    4
    Hello,
    I'm pretty new in unity and VR so maybe it is a basic thing -
    I'm trying to build sort of a race - a first person view of someone who is surfing on a surfboard. I want that the user would be able to move the headset and look around freely during the game. On the other hand, when the user makes a turn, the "camera" still looking forward to the same direction before the turn (which can make sense since the user controls the rotation of course..). Is there any way to sole this issue? (without causing a motion sickness)

    Thank you very much,
    Orit
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Hold on there. How does the user do that?
     
  3. orit_cohavi

    orit_cohavi

    Joined:
    Oct 15, 2018
    Posts:
    4
    I'll try to explain: The user suppose to navigate the surfboard by hand gestures which captured by leap motion. Each hand movement controls the movement of the surfboard (left - right). The *position* of the camera depends on the position of the surfboard (move forward with constant velocity, and left - right by hand gestures). The *rotation* of the camera is controlled by user's head, so he can look around. So when the user turns right, by hand gesture, the surfboard turns right as well -> the camera *moving* in right direction, but the *rotation* stays the same because the user looks at the same direction as before. Then for example he looks at the trees that surrounds the path but moving right through the river.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    OK. So the only way to do that without making many users sick is to teleport from one position to another. If you move smoothly, that will cause motion sickness (in some players).

    Of course you could choose to do it anyway. Many users play VR games with smooth motion (especially FPS games) without suffering nausea.

    If your question is how to do that, we'll it's simple: the headset only controls the local rotation of the camera. So you just put the camera inside some parent object, and move/rotate that.
     
  5. orit_cohavi

    orit_cohavi

    Joined:
    Oct 15, 2018
    Posts:
    4
    Thank you very much!!