Download

How to implement a zoom controller like the one in Unreal's VR editor ?

Hi, I am trying to implement a VR zoom controller similar to the one inside Unreal’s VR editor.

I use the “Set Relative Scale 3D” blueprint node, and I can change the zoom level smoothly. However I have a few issues, and I am not really sure I am doing things correctly.

My first problem is the size of the controllers, they either become very tiny or very big, depending on the zoom level. I can change the scale of the VR_Pawn, but then many things are broken. I can also set the scale only on the motion controllers child actors, but then they disappear when they are close to the camera (like this).

My second problem is the camera, it moves when I change the relative 3D scale, and I don’t want it to move. I tried to apply a negative location on the VR_Pawn default scene, so the camera stay at the same position. The problem here is I have run out of ideas about how to compute the negative location values. I now it’s possible because I can bruteforce them using a while loop (try another value until the camera is more or less back to its original position…). It’s very dirty and stupid, so I am looking for a solution.

Does anyone have advices about how to implement such a zoom feature ?

Seconding this. It would be great to have access to the exact same functions (user interface, controller button mapping) the Editor scaling function provides in a regular VR template.