mordentral
(mordentral)
September 26, 2018, 12:45pm
14
Slayemin:
I haven’t looked at the engine code in 4.20 yet, but if the engine still doesn’t support locking only the HMD rotation to the camera, the implementation principle is going to be roughly the same as I outlined above. I know Epic has refactored a lot of the backend implementation code to be more hardware agnostic (reflected in their “XRSystem” rename), so if you’re trying to mod the engine in 4.20, you’ll need to adapt to their refactoring. Here is the modified code I’m using in 4.18, which is probably not going to be too much different from 4.20:
Some day when I get github figured out, I’ll submit this as a pull request so that the change is integrated into future engine releases and doesn’t require mods. Alternatively, if anyone else wants to get the ‘engine contributor’ tag, you can submit it yourself and get credit for it. I don’t really care, as long as it gets in there.
It doesn’t require an engine change…
I have something kind of like this in my plugin, you just need to derive from the camera and override that function. Its niche enough that it likely wouldn’t make a good pull request, and is pretty easy to implement with a subclass.