Download

Simple method to move actor to "keep up" with camera without unchecking 'Lock to HMD'

Hey guys, so I’ve been trying to figure out a decent way to move the entire actor so that it follows the HMD-locked camera component, so that things like built-in movement replication, falling etc. will work without extra code, and I’ve finally hit on a method that seems to work. Best of all it does not require disabling late updates (‘Lock to HMD’ on the cam component).

That said, it’s currently untested, and due to the way it works it may cause some weirdness when actually using it in VR. For one thing, I think I need to more intelligently capture the pre-move relative camera transform so that it can be restored after moving the actor, so that the view stays seamless.

Anyhow, I figured I’d post the method for those that need this functionality, because just letting the components move without the actor simply does not cut it in many many situations.

I’ll be updating the method with any fixes after I test it in VR later tonight.

CameraRelativeTransform is the transform of the camera component in your BP. Just copy in the location/rotation.