[Google Cardboard] How do i make the user to move where he is looking?

Honestly i have no clue what do create/do. I have manage to get it functioning and port a VR test to my Galaxy S5 and work flawlessly. Now the next step in my development process is making it so you will move where you look. The hope is that it will allow the user to explore a building. I would rather they not float into space if they look up though. Its all funny because all i can find are people trying to do the opposite on the Rift.

Thanks in advance

Hey Pattonsguy,

Depends on a few things:

  1. First of all are you using a premade character Pawn class, or you are about to create your own?
  2. Do you want them to be able to move contantly, or controlled somehow?

Well there are other things, but these might be the most important to start out. There is a Node called “Get Orientation and Position”, that will give you your device rotation. Check if the Camera in your Pawn is Locked to HMD. After that you have a few options:

  1. If you just want to simply move forward, get the forward vector of your camera. (get)Camera>>Get Forward Vector
  2. Add Node of your Input Axis and connect it up to a Node “Add Movement Input” + the forward vector you got. (If your Pawn class derives from Character you can specify that the Character stays on ground otherwise you’ll have to do the mechanics yourself. In case of no stairs only on one plain you could lock transform on one axis)

I hope this jump starts you a bit, if not, please specify more details.
Cheers,
K.

alternatively you can also set relative/world position of your camera towards the direction your camera is facing, but that might just mess things up

Hi Pattonsguy,

Check out this youtube tutorial “UE4 - Simple Teleportation Mechanic”


Should get you started really quick.

I believe using a character blueprint would be more efficient for the process. I plan for movement to be constant. I will check out the orientation node when i am at my workstation later.