Changing eye height in VR (Oculus)


This is my first post here :slight_smile:

I’ve been using UE to make visualizations and in my latest project I’m using VR. My client had a presentation and was asking me to make possible for a person to change eye height while in VR.

I first made it with a very simple AddLocalOffset for the first person camera. It works great! Although I don’t know how to limit the height it can go up or down, so if someone wants to play with it, it can go through the ceiling or the floor, haha. Kidding aside, I found out that this AddLocalOffset for the First Person Camera doesn’t work in VR… it is so the person can have 15 increments to go down or up as much as they want, not a fixed position.

Does anyone know how to do it? It would really help.

Also, I’m an extreme noob with Blueprints and programing.

Thanks and have a great day,

Alex C.

Thanks Dune!

This is using First Person Template. It’s a bit weird that when I use the First Person Camera offset, it works normally but not in VR.

I wanted to do something with the actual character, remove gravity then just move it up or down, but I have stairs in the building and that will not work.

Is this using the VR template? The camera is attached to a Pawn/Character in that project I believe, so moving the Pawn higher or lower will also set the height of the camera. However, in a first person template there is probably a capsule component that simulates physics with gravity, so raising the player up will work, however due to the physics simulation the player will drop down to the floor again?

The camera in VR is relative to the players head I believe. This means that it is overwritten as a location each frame based on the tracking data. So I’m not sure whether directly changing the Location/Rotation of the actual camera will have any effect, as it will be overwritten by the tracking data?

You may want to look at only moving the actor/component that the Camera is attached too.