Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
VelociraptorGam's avatar
VelociraptorGam
Honored Guest
12 years ago

[UE 4.5.1] Decoupled mode has wrong translation ?

I've implemented the decoupling of look and movement rotation as described in the UE4 Wiki.
https://wiki.unrealengine.com/Oculus_Rift_Separate_View
However the HMD tracked offset/translation does not respect this and now positions itself as if I'm always looking along the World-X (eg Zero rotation). (does bUpdateOnRT=false actually do anything anymore on 4.5.1 ? )

How can I take control over the offset that is being applied on my camera to rotate it with the character orientation so that offsets are correct ? I must be missing something ?

From what I can see all the action happens in: FOculusRiftHMD::CalculateStereoViewOffset

2 Replies

Replies have been turned off for this discussion
  • For those interested:

    To disable HMD offsets done by Oculus implementation:
    FOculusRiftHMD::CalculateStereoViewOffset : [Commented] ViewLocation += vHMDPosition;

    And then you can manually set camera position in your CharacterController::UpdateRotation
    (I know, unfortunate function name now that we're handling position as well, but I don't think Epic had HMDs in mind when writing the API)

    My philosophy is to give the developer the deciding factor on how and where to implement camera transforms, not have it happen automatically behind the scenes and then not work when you deviate from the standard UE4 FPS setup. Just have good documentation on the wiki and provide a game template with the code to make the standard mode work so we can change and experiment.

    "KrisRedbeard" wrote:
    there are other issues with translation/offset. See Head Offset.


    I'll likely have to tackle that one as well if it is even accessible from within the UE4 code.