I’m using the MotionControllerPawn from the VR template on a Vive. I noticed that the pawn doesn’t seem to work when added to other maps and with Set Tracking Origin set to Floor Level I end up spawn with my face in the ground.
I managed to workaround this by setting the Z location on my VROrigin component to 92cm and resetting the tracking origin and orientation/position. With this my VR chaperone aligns perfectly with the floor until I teleport. Nav mesh appears to be working in that my teleport beam is flush with the floor. The problem is when I land at my destination I am back with my torso in the floor.
Anyone know what the problem could be, or have a suggestion of how I can offset again as a workaround? Subsequent calls to tracking origin/reset orientation+postion leave me in the floor still.
In classic tradition I found a fix or workaround 5 minutes after I asked. It’s not exactly what I call pretty, but it is working on a flat/level surface just fine.
Check out the highlighted in blue area in the attached picture. Basically I’m taking the Z location of VROrigin and merging that with the X,Y of the actual generated teleport destination.
I noticed that initially when I teleported I seemed to keep doubling up on my height from the ground so to offset from the location back to proper height I divided by 2.
It works…but I’d really like to know why the VR template doesn’t work out of the box because this fix feels like a band-aid.
What’s Up UltiHam,
So I see you have a solution there. In order to get an accurate Camera height, it technically should be this node below.
So the setup should be as follows for a typical VR setup:
- Setup Pawn, use Character if you want Movement.
- Add Camera under its own Scene Component
- Raise Camera from 0 on the Z relative location to increase relative height.
- Set Tracking to Floor Level for Vive & Oculus because they positional tracking. Set Tracking to Eye Level for Gear VR and etc because they don’t have positional tracking.
- Use Teleport, your height shouldn’t change unless the ground under you does.
You should not have to account for camera height with offsets unless its for calibration which you can do internally. If you’re noticing weird behavior, try restarting Unreal. If you used Eye Level at some point, switched back to Floor Level. It may require another restart just to ensure things are consistent, but once you have it setup correctly. It works consistently.
[Peter L. Newton]
Awesome. Thanks for the info! I was playing with floor/eye level when I was first running into issues. Seems indeed that after restart Unreal things actually got messed up again and following the advice above worked.
Has anyone noticed what works in the engine (as far as this teleportation fix) does not work in a build ?
I find I need to remove this fix to build correctly.
could you find the problem? I am dying couldnt fix that