Hey guys, I’m starting out in UE4 right now and I wanted to prototype a small flying project.
My character is a bird and has a camera in the over-the-shoulder position.
Now, I wanted my camera to be a child component of the root so that when my character rotates, my camera’s world rotation will also change. This was trivial to do ion Unity, since only the local rotation was controlled by the HMD and the world rotation was handled by the hierarchy. Unfortunately, it seems UE4 does not follow the same rule. Apparently, the HMD controls the world rotation exclusively.
To solve this, I disconnected the camera and the HMD by unchecking the “Use Pawn Control Rotation” flag. Then I added the following code to my blueprint:
This sets the relative rotation of the camera and allows the camera to rotate along with the root component. However, one major problem I’m facing currently is that there is a weird position issue that occurs for the left and right cameras. While using relative rotation, the two cameras don’t seem to keep the same distance between them and their relative position to their center point(i.e. anchor) is not the same. This causes objects close to the camera (like the bird’s back) to become blurry and induces double vision.
This does not happen while using the default camera behaviour.
I’m not sure if I explained my problem clearly enough. If required I can upload a small build or something to explain it better.
Cheers.