Can anyone explain to me how the HMD/camera in a pawn really works? Following a UE tutorial, I created a pawn and added a Camera, with Lock to HMD set. Worked fine. Then I deleted the camera again, but I don’t actually see any change. My pawn has no camera component at all, but when I put my HMD on I’m still seeing a view (likely from the root of the pawn). Can someone please explain how this is? I am using a Vive.
What I really want to do is position a camera where the head of the character is, and take the rotation from the HMD, but NOT the location. I do not want to use the room scale feature at all… I want to be able to step sideways in reality but not have any change to the camera location in game, how can I achieve this?
I have added a camera to my pawn, with “Lock to HMD not ticked”, and explicitly set the location and rotation to 0 every tick, but the HMD just continues to move around as usual. Do I need to explicitly select this particular camera, and if so, how?
I would not recommend disabling positional tracking, but if you want to have a seated experience like a car driving one look into the Set Tracking Origin node it allows you to manually place the camera in your Pawn and have that be your default position
Thanks, but neither of those works. As mentioned, I have tried to set the pawn camera position and rotation, but it makes no difference. Neither does deleting that camera. What camera is actually used when there isn’t one in my project?
oh and thanks for the recommendation but I want to try disabling the position anyway, and most likely just limit it to the position change due to small tilts of the head. But first I need to understand how ue4 handles the hmd and camera.
I’ve been digging into this a bit more. If you create a pawn without a camera, there are a few weird things which happen. But let’s add a camera component. It seems that the Hmd location within the playspace is a CHILD of the camera component. When you click “Lock to Hmd” the camera relative location is set to equal the location of the Hmd within the playspace, giving the impression that the camera and the HMD coordinates are the same, but they are not… If you uncheck “Lock to Hmd”, you can discover that the Hmd relative location within the playspace (that returned by Get Orientation and Position) is actually a child component of the camera. You can get and set the relative position of the camera component, but the Hmd location (and rotation) within the playspace will be ADDED to the cameras relative location. Any Get relative location done on the camera ignores the Hmd offset, and only returns the camera component. Just setting the relative location of the camera moves the camera component but the Hmd continues to move within the child space. Setting the relative location with “Lock to Hmd” enabled doesn’t do anything as I guess the values are overwritten by the Hmd relative location.
I’m now going with “Lock to Hmd” turned off, and offsetting the cameras relative position by the negation of the Hmd position as returned from Get Orientation and Position, and this works: