Announcement

Collapse
No announcement yet.

Positional Tracking when player is parented to a moving object

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

    Positional Tracking when player is parented to a moving object

    I've got a scene similar to a roller coaster, where the player is parented to an object that's moving along a track. As the player moves through the scene and changes direction, the positional tracking gets thrown off. Can anyone tell me how to correct for this?

    #2
    I experienced the same problem (Where when you move your head forward, you move forward in X no matter what direction your "roller-coaster cart" is facing.)

    Been a while since I looked at the project - But I remember updating to 4.4.1 and the problem being solved. (so troubleshooting step 1 - What engine version are you using?)

    Comment


      #3
      Hi and thanks for responding! I'm on 4.4.1. If I start with the VR Template and parent the player to a moving platform that's animated via matinee, I get the same problem. I also see this problem with the Space Shooter VR template if you do a 180 from the starting position.

      Comment


        #4
        Which character template are you using?

        I bet if you change it to use the one that has the camera attached/parented to the character's head bone, it will do what you want (just make sure the anims don't have involuntary head motions).
        Storyteller - An immersive VR audiobook player

        Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

        Comment


          #5
          I was able to do the position tracking offsetting of a camera that "rides" inside of a blueprint like this:

          Click image for larger version

Name:	OculusVehicleFixtest.jpg
Views:	1
Size:	109.3 KB
ID:	1056616

          It's all hooked up to a tick event. That is actually a fix for a bug with the Vehicle Template in 4.4.2. When we updated it to include the interior for the Oculus, the tracking would be rotated based on the world instead of the car. Let me know if that helps.
          Twitch /unrealalexander| Twitter @UnrealAlexander
          How to report a bug? | Installation & Setup issues?
          Call me to a thread by posting this: [MENTION]Alexander Paschall[/MENTION]

          Comment


            #6
            Hi Alexander,

            Thanks for the diagram, I may be wrong but it dosen't appear to be the whole thing - what plugs into the "SET"?

            Cheers!

            Comment


              #7
              Originally posted by Bushey View Post
              Hi Alexander,

              Thanks for the diagram, I may be wrong but it dosen't appear to be the whole thing - what plugs into the "SET"?

              Cheers!
              Which Set are you referring to here?

              Set Head Rotation is set as a combination of Device Rotation from the Get Orientation and Position and the Mesh's World Rotation.

              The Cam Origin is set in the construction script to the Internal Camera's Relative Location. This allows you to reference the starting point of the camera.

              Let me know if that helps or if you have any questions.
              Twitch /unrealalexander| Twitter @UnrealAlexander
              How to report a bug? | Installation & Setup issues?
              Call me to a thread by posting this: [MENTION]Alexander Paschall[/MENTION]

              Comment


                #8
                Hiya,

                At the top of the diagram several nodes are plugged into a node called set - But from your screenshot I don't know what's at the other end of the graph -

                Sorry, I'm new to scripting and don't fully understand!

                Originally posted by Alexander Paschall View Post
                Which Set are you referring to here?

                Set Head Rotation is set as a combination of Device Rotation from the Get Orientation and Position and the Mesh's World Rotation.

                The Cam Origin is set in the construction script to the Internal Camera's Relative Location. This allows you to reference the starting point of the camera.

                Let me know if that helps or if you have any questions.

                Comment


                  #9
                  The Set node up top is "Set Head Rotation". The white line coming out of the left of it is an "execution" line that is from a Tick Event. The Blueish dot is called a "Pin" and is linked to the "Combine Rotators" node that is adding the sedans rotation to the oculus rotation to offset it by the car's turning. The execution running out from the right is just continuing the

                  If you are new to blueprint scripting, I would recommend checking out these resources:

                  https://wiki.unrealengine.com/Category:Tutorials
                  https://wiki.unrealengine.com/Bluepr...orial_Playlist
                  https://wiki.unrealengine.com/Bluepr...orial_Playlist
                  Twitch /unrealalexander| Twitter @UnrealAlexander
                  How to report a bug? | Installation & Setup issues?
                  Call me to a thread by posting this: [MENTION]Alexander Paschall[/MENTION]

                  Comment


                    #10
                    Hey all. I'm the original poster, just chiming in to let you know the fix to my issue was a simple check box in the PlayerCameraManager blueprint, called "Follow HMD Orientation". A big THANK YOU to Stephen Hess for pointing me towards it.

                    Comment

                    Working...
                    X