Search Unity

VR How can i add physics to the player?

Discussion in 'AR/VR (XR) Discussion' started by ExpressedUnity, Apr 14, 2018.

  1. ExpressedUnity

    ExpressedUnity

    Joined:
    Apr 19, 2015
    Posts:
    59
    Title says it all. I would like to add physics to the player so that if he/she walks off the edge of a platform they drop instead of float. Is this possible?
     
  2. Deleted User

    Deleted User

    Guest

    I would suggest starting with the basics before heading into VR development. Pick any tutorial here and complete it. Rinse and repeat with another. https://unity3d.com/learn/tutorials
    Once done, you should be able to do this without any trouble.

    To answer the question : Yes it is possible. "How" can differ from platform to platform.
    Just put the camera inside a parent gameobject. Check the "player's" position every frame. If he's out of bound, translate the parent accordingly and the player will follow along.
     
  3. bradweiers

    bradweiers

    Joined:
    Nov 3, 2015
    Posts:
    59
    For the record. I *highly* recommend against doing this to a player. It will cause motion sickness and generally make sure that they never play again.
     
    Deleted User likes this.
  4. Deleted User

    Deleted User

    Guest

    I concur!
    Unless you want a specific, never-trying-it-again feel like this :
     
  5. ExpressedUnity

    ExpressedUnity

    Joined:
    Apr 19, 2015
    Posts:
    59
    Iv been using unity for a very long time. I know what im doing when it comes to anything other then vr :p. Iv figured it out anyway. Thanks