CameraOffset still have some issue

FVector NewCameraOffset = Camera->GetComponentLocation() - GetActorLocation();
NewCameraOffset.Z = 0;
AddActorWorldOffset(NewCameraOffset);
VRRoot->AddWorldOffset(-NewCameraOffset);

This is the code used in class for correcting the position of the camera, but when I ran it, the camera is still a bit off to the side. Is it normal?

No, and it should work if implemented as per the course. It is a tricky one to get right. Check that the there are no offsets applied in the Blueprint and compare your code with the end of lecture code to ensure it is correct.

Let me know how you get on.

Privacy & Terms