SteamVR Developer Hardware

SteamVR Developer Hardware

Unreal pawn "height" ?
How is everyone handling unreal pawn "height"? The current implementation of SteamVR integration parents the VR coordinate space to the pawn's camera. In other words, by default, you're standing on your pawn's "eyes."

We work around this by detecting that the HMD is attached, and moving the pawn's camera to the bottom of the pawn. Doing it this way works OK, but gets confusing in some situations.

For example, imagine we want to teleport the player to another location. We do this by placing a TargetPoint in the world, and then teleporting the pawn to that target point. Currently, we have to remember to keep the TargetPoint exactly 88cm off the ground: the pawn is 176 cm tall by default, and when we teleport we're setting the position of the pawn's center, not his feet.

I'm probably not doing a great job explaining. TL;DR - we have to do weird mental gymnastics every time we think about the pawn's height and the different coordinate systems involved. Has anyone found a simpler way?
< >
Showing 1-1 of 1 comments
lfl_ben_peck Oct 5, 2015 @ 4:15pm 
Are you sure it's parenting to the pawn camera component, not the pawn actor origin? In 4.8 I get the behavior that VR space is based around the pawn actor origin. Moving the pawn camera component does not affect VR space for us, only moving the pawn actor itself will affect VR space. But again perhaps this is different in 4.9...?

This 176 cm pawn height, is that an eyeHeight property value or something?

If that's the case, I would recommend making the eye height 0, and snapping your TargetPoint actors to the ground plane/geo. Epic uses 0 eye height in their own VR demos as well. Then you can just teleport the pawn to the TargetPoint, and your pawn actor origin is placed on the ground, and then the Vive's HMD position offset in Z will add on top of this teleport position (and feel like the correct height).

Edit: I will add that yes, we are doing essentially same thing as you. If an HMD is detected at launch, we place the pawn at the bottom of the playerstart capsule, instead of spawning the pawn at the center of the player start capsule. Rest proceeds as normal, with 0 eye height.
Last edited by lfl_ben_peck; Oct 5, 2015 @ 4:41pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50

Date Posted: Oct 5, 2015 @ 1:46pm
Posts: 1