Announcement

Collapse
No announcement yet.

Get body forward vector vs head (Camera) in Blueprints

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

    Get body forward vector vs head (Camera) in Blueprints

    I got locomotion movement using thumbstick. Right now the character moves based on head rotation via camera. I want to add a option to let player move based on body forward vector. I can't seem to find anything on this, How would I do this?

    #2
    You can add a scene component parented to the root component of your pawn with X+ pointing in your forward direction and use the forward vector derived from that, though this means youll have to manually rotate the pawn instead of physically turning around.

    Ive made a VR player with a torso that lerps rotation between the forward vector of the pawn and the forward vector of the camera, which mitigates this to some extent and allows the player to move 'forward' while looking 'backward'.
    Website: http://artbybeven.wixsite.com/jackmadethat
    Twitch: https://www.twitch.tv/bevd0g

    Comment


      #3
      Originally posted by Bevman00 View Post
      You can add a scene component parented to the root component of your pawn with X+ pointing in your forward direction and use the forward vector derived from that, though this means youll have to manually rotate the pawn instead of physically turning around.

      Ive made a VR player with a torso that lerps rotation between the forward vector of the pawn and the forward vector of the camera, which mitigates this to some extent and allows the player to move 'forward' while looking 'backward'.
      Thank you so much. Few days after posting this I realized how dumb this question was. Hopefully future VR headsets will have a way to get bodies forward using a tracker or something. Getting forward based on controllers makes interacting with objects less intuitive. Getting it through head makes it so you can't look around and move in a different direction.

      Sine you gave me a possible solution I will tell you what I came up with.
      I get the users real starting location in the real world. I use that point and current real world position as a joystick. Than if I have my vr headset moving up and down (running in place) my character moves based on direction of current position and start position of real world. So I can look around and strafe. Its weird but you get used to it. Lets you get some exercise and you don't need alot of room.

      Comment

      Working...
      X