VR Camera Location is wrong
I'm working on a room scale VR game with the HTC Vive and there's a new bug which popped up in 4.13 which didn't exist in 4.12.
I have a camera which is attached to a scene component called "Tripod". The tripod scene component is attached to another scene component called "BaseComponent", which is always at the foot/floor of the character. When a player wears an HMD, the relative offset of the tripod component changes to change the camera position. The tracking origin is set to the floor. So, if I'm standing up with the HMD and I measure my relative height from the floor, I get about 172cm and the ground plane in the game matches the floor in my office. I can stand up and crouch, and the HMD has perfect correspondence to my actual height.
However, if I select the camera component and set "Lock to HMD" to false AND have "Use Pawn Control Rotation" set to false, and then I go and stand in the center of my play space and crouch and stand, the height offset is completely off. If my HMD moves below my hip height, the camera view goes through the floor. If I stand all the way up, I'm way outside the bounds of the character capsule component. To adjust the camera height, I am using the "DevicePosition" node and wiring the Z value into the relative location of the tripod in the tick function.
What's really weird is that I can draw a debug sphere at the reported world space tripod scene component location, but that doesn't match up with my actual camera location. However, if I enable either "Lock to HMD" or "User Pawn Control Rotation", the visual output and camera locations match perfectly.
This is my blueprint setup:
This is what I see in VR. The camera should be in the red sphere and the white sphere's Z axis value should always be exactly at eye level.
This is what I see when I enable "Lock to HMD" and disconnect the wires from updating the tripod component values. The camera is now correctly inside of the red sphere.
I can't use pawn control rotation because I don't want my character rotation to be bound to the HMD yaw. A player could be looking over their left or right shoulder.
I don't want to lock the camera to the HMD because I need to manually set the camera location to be on top of the characters head if the player attempts to walk through a colliding obstacle in VR. Their physical body may clip the colliding geometery, but their camera and character do not.
I had this working in 4.12 :(
asked Sep 23 '16 at 01:52 AM in Bug Reports
We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.
Follow this question
Once you sign in you will be able to subscribe for any updates here