My setup is a 2D game which has a player character that uses Z-Rotation for the movement/animation system. For the longest time, I have had a lot of trouble finding out how to properly position the player character in schematics that require the player to face or move a certain direction, such as in cutscenes.

No matter what I do, the player seems to ignore any directional input whatsoever if it's from the schematic.
I.e. Say the player is facing to the right. if I use Change Position or Move Into Direction nodes to move the player upwards, they will remain facing right, but move upwards while animating the right-movement clip.

I have tried turning off auto animation, manually changing the Rotation variable to the corresponding direction, and even tried using Change Sprite nodes to physically change the player's sprite child temporarily. Nothing seems to work.

Any ideas on how to solve this, or something I'm missing? Any help would be super duper appreciated!
Agender, curry fan, Top 10 lister, indie dev, gym hitter, musician, et al.
  • The closest I can get is by using Move Into Direction, selecting Face Direction, and moving them an extremely small distance like 0.01. This kind of works, but it plays their walking animation, which isn't ideal if they're just supposed to face a direction without walking.
    Agender, curry fan, Top 10 lister, indie dev, gym hitter, musician, et al.
  • Since 2D animations only support Mecanim, I'd generally recommend to turn off auto animations, they're meant for the legacy animation system. Instead use the ORK animation setup for Mecanim animations to forward the speed and rotation as it's e.g. done in the 2D quickstart tutorials.

    Otherwise, I'd need to know more details about your animation and prefab setup.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I use the same blend tree and animation system that's recommended in the tutorial, though it uses 8-direction rather than 4-direction. AFAIK I never selected to use auto-animation, but I'm not even aware where the setting for that is.

    Either way, I was able to have the player prefab face a direction with no walk animation by using Move Into Direction, setting it to a small increment of 0.01, and finally setting the speed of the move to 0. I'm not sure if this is the intended way to do so, but it seems to be working for me, for now.
    Agender, curry fan, Top 10 lister, indie dev, gym hitter, musician, et al.
Sign In or Register to comment.