playMaker

Author Topic: [SOLVED] Vector3 of Character constantly changing (3rd person controller)  (Read 227 times)

JadenXavier

  • Playmaker Newbie
  • *
  • Posts: 2
Hi everyone, for context I am using a 2d sprite character in a 3d world, which means I have to manually set its animations (front view, back view, sides view) manually depending on the current vector of the character. I have followed the 3rd Person Character controller tutorial from PlayMaker's YT channel but have found an issue where the vector of the character changes due to the vector being relative to the camera.

This causes the animations to be played wrong because the code doesn't know where the character is truly facing because its vector is constantly changing when the camera is being moved around. Any insight is much appreciated !

**Edit

Not sure why I didn't think of it but I made two instances of Get Player Input Move Vector, one storing its data on a Vector called "baseMoveVector" with no relation and the other stored in a variable called "moveVector" with relation to the Main  Camera.

In my Character Controller Simple Move, I use the moveVector variable so I can move my character with relation to the camera. When transitioning to other animations, I use the "baseMoveVector" which will always have a value of -1, 0 or 1 for the vectors, so I can easily determine which direction the character is currently going and assign the animations appropriately. Hope this helps anyone else!
« Last Edit: May 08, 2023, 11:20:29 PM by JadenXavier »