0

How to change camera position for vr project in unreal engine? I want the camera to be always in the middle of the collider

camera->setWorldLocation doesn't work(((

enter image description here

enter image description here

2 Answers2

0

There isn't a lot of information on your question and it's difficoult to answer correctly but I can say that the best thing (basing on the configuration I think you have) is to move in the blueprint the collider down, and you'll have the camera in the middle, and to avoid the overlapping of the collider with the ground, then move up the actor. If you can move things in the editor it's better than moving at runtime.

If you need to move the camera in runtime maybe the problem is that the camera is attached to the VR and even if you use setWorldLocation, than the camera returns to it's normal position due to the head movement. Try to move the root component or the collider (that I guess is not attached to the camera) in world space or local space (so setWorldLocation or setRelativeLocation).

PaesaggioSonoro
  • 157
  • 1
  • 5
0

untick "lock to HMD" in the blueprint editor under the camera details

Bazza
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 28 '22 at 11:20