Announcement

Collapse
No announcement yet.

Attach components to the HMD

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Attach components to the HMD

    Using C++, I am looking to be able to attach components to the HMD. There seems to be only two proposed solutions out there:

    1. Attach the component to the PlayerCameraManager TransformComponent.
    2. Fetch the coords of the HMD and Tick the components in place.

    The first method does not work because the camera and its transform component are always located at the center of the chaperone floor, and not the HMD.
    The second method does not work because I need the component to sync with any LateUpdate changes which occur in the render thread, such as rotating the chaperone.

    The motioncontrollers have the ability to have components attached to them, and their behavior and display are exactly what I need. So surely the HMD(just another motion control) should have something similar, but I cannot find anything which allows components to be directly attached to the HMD. This seems too fundamental of a need for there to not be a solution, so any help is appreciated.
    Last edited by wearestardust; 09-30-2018, 10:33 AM.

    #2
    Put another camera in the player pawn, set it to lock to hmd, parent objects to that camera instead. I don't think you have to change which camera you see through.

    Comment


      #3
      Thanks for the reply. My project does not have any pawns to be possessed, but your suggestion helped me find what it was looking for in C++.

      By adding a CameraComponent to an Actor, and using SetViewTarget from the PlayerController to the Actor, the CameraComponent will snap to the HMD and CalcCamera will be called on the Actor class instead of the PlayerController. New components can then be attached to the new camera as you suggested.

      Cheers

      Comment

      Working...
      X