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

how to make a google vr player which will move with controller..?? help please i am new...

Discussion in 'AR/VR (XR) Discussion' started by talha_ishaq, Jun 16, 2017.

  1. talha_ishaq

    talha_ishaq

    Joined:
    Jun 16, 2017
    Posts:
    2
    i am creating game. i want my player to move with the gamepad and look with head movement.. can any body please guide me how to do that .... you can give me links top view video as well which may help me,
     
  2. BamBamAlicious

    BamBamAlicious

    Joined:
    Jan 29, 2017
    Posts:
    58
    Attach the camera to a GameObject, then control the parent using Input.GetAxis, or Input.GetKey etc etc. The camera will move with the head providing you attach the Gvr scripts, and when the parent moves, the camera moves with it! Bear in mind that unless the player is sat in some kind of cockpit, or vehicle, or you're playing third person perspective... nausea can come on VERY quickly!
     
    astracat111 likes this.
  3. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    There are some steps you can do to limit this like limit the fov when moving like Eclipse: Edge of Light did. That being said it is important to note that you are limiting your audience by at least half if you do things like movement. Some people's brains are completely fine with it. Others get nausea and headaches quickly.
     
    astracat111 likes this.
  4. astracat111

    astracat111

    Joined:
    Sep 21, 2016
    Posts:
    725
    I wanted to just have still cameras completely with only rotation, and then switching between cameras (not 3rd person but like a fixed perspective like an adventure game). Is that gonna create nausea too?
     
  5. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Not entirely clear on what your control scheme is but it doesn't sound like it would create nausea. Nausea at it's simplest comes from your sensors (eyes and motion from ear) basically sending competing information. In OP's movement case his eyes would be telling him he's moving but his ear is telling him he's standing still. Limiting the FOV makes the eyes feel like they are less immersed and more watching a tv screen so the brain no longer thinks the sensors are fighting with eachother.

    In your scenario I'm assuming the "switching cameras" is more like a teleportation action and as such there is no sensor mismatch. Teleportation is one of the most common VR movement schemes, when you don't have positional tracking like is the case with mobile VR.
     
    astracat111 likes this.
  6. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    Last edited: Jun 18, 2017
  7. BamBamAlicious

    BamBamAlicious

    Joined:
    Jan 29, 2017
    Posts:
    58
    By the sounds of it you want to do something like many of the HTC Vive games are doing at the moment, (Rick and Morty, Robo Recall) where the player teleports between points on the level. If whatever character you're controlling is stationary then nausea shouldn't be a problem.
     
    astracat111 likes this.
  8. astracat111

    astracat111

    Joined:
    Sep 21, 2016
    Posts:
    725
    Nice, thanks for the reply greggtwep. : )
     
  9. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    Anyone experimenting/thinking about locomotion: you should install daydream elements APK on your phone and play through it, it demos various locomotion schemes and best practices.

    Unity project with all source is available on git.

     
  10. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Agreed, except for the chase camera, that one is pretty bad. The others are good and there are some good ones in the older playground examples.