Announcement

Collapse
No announcement yet.

Set rotation for VR player not working

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

    Set rotation for VR player not working

    Hi,
    I am trying to teleport and set the rotation of the player (pawn) using 'Set actor Location' in my VR game. I am getting the position and rotation from another actor [playerteleportboxhenge]. The position seems to work fine however I cannot get it to match the rotation. I have tried many things and think I must be missing something. I have even tried just inputting a value rather than trying to get it from the actor but still nothing happens. It always seems to be facing the same direction as prior to teleporting.

    I notice someone else here with a similar problem but no solution. Anyone got any ideas?, blueprint below. Also on seperate note, how do I disable player movement in a VR game but keep the VR head rotation etc usable, basically to keep the player fixed to the spot?

    Thanks in advance

    Click image for larger version

Name:	Capture3.PNG
Views:	1
Size:	177.7 KB
ID:	1147098

    #2
    Yeah, still no idea how to fix this.
    Since this problem is pretty old I hope the Devs are still working on it...

    Regarding movement:
    You could use a " float * float" node with you movement input. Just set a value to 0 per custom event, so the Controller input is multiplied by 0.
    Last edited by nn23; 03-29-2015, 09:24 AM.

    Comment


      #3
      Thanks for that, is there any workaround to this that you have found or alternate method to set the rotation and position?

      Comment


        #4
        Is the pawn set to use controller rotation? if so then the HMD will be driving the playercontroller rotation which will drive the pawn. You would need to separate the two and drive the camera from the playercontroller rotation and the pawn should then rotate separately. the camera would need to be attached to the pawn's root component for position only. this might involve an inverse rotation or a position constraint or something.
        Visual Effects Artist, Weta Digital, Wellington New Zealand
        BLOG www.danielelliott.co.uk
        @danielelliott3d https://twitter.com/danielelliott3d
        Unreal Engine and VFX Tutorials https://www.youtube.com/user/DokipenTechTutorials
        2015 Showreel: https://vimeo.com/116917817

        Comment


          #5
          After a week of trying out different things and a hell of a lot of trawling around forums I finally found this fix to the VR Teleport 'set rotation' problem. Thought I would post it here to help others who have posted with the same problem.

          Basically here I am getting the location/rotation from an actor (no collision box) in world (PlayerTeleportBoxHenge) and using that to set the rotation. If you adjust the rotation of the box in world it sets the HMD to teleport to the location and start matching/facing the boxes rotation. And works! Finally.

          Click image for larger version

Name:	VRRotationTeleportFix.PNG
Views:	2
Size:	167.9 KB
ID:	1072117

          Comment


            #6
            Strange...

            will try out when I'm home!
            Thanks for your research and posting!
            Awesome!

            Comment


              #7
              Originally posted by Fnordcorps View Post
              Hi,
              I am trying to teleport and set the rotation of the player (pawn) using 'Set actor Location' in my VR game. I am getting the position and rotation from another actor [playerteleportboxhenge]. The position seems to work fine however I cannot get it to match the rotation. I have tried many things and think I must be missing something. I have even tried just inputting a value rather than trying to get it from the actor but still nothing happens. It always seems to be facing the same direction as prior to teleporting.

              I notice someone else here with a similar problem but no solution. Anyone got any ideas?, blueprint below. Also on seperate note, how do I disable player movement in a VR game but keep the VR head rotation etc usable, basically to keep the player fixed to the spot?

              Thanks in advance

              [ATTACH=CONFIG]32417[/ATTACH]
              I believe what is going on is that the node "Set actor Location and Rotation" Actually takes into account the world rotation, try the node "Set actor relative rotation" instead, as this one uses the actual actor relative rotation, you might need to cast this action to the actual player component in order for it to work, instead of getting the player controller.

              Comment

              Working...
              X