我在制作横版平台跳跃游戏时,发现添加角色的转身动画很困难。因为在主角静止站立的时候,我不知道如何读取角色的面朝方向,从而判定输入的方向键是否与面朝方向一致,并以此为触发条件添加转身动作。目前我可以通过项目开关或者手动翻转所有的动作动画来实现这个效果,但这样很繁琐。我希望官方能够添加一个检测输入的方向键是否与面朝方向一致的变量目标,这样就可以很快的做出转身动画了。
When developing a side-scrolling platformer game, I’m struggling to implement character turning animations. While the character is standing still, I can’t determine their facing direction to check if the input direction key matches it, which would serve as a trigger for turning animations. Currently, I have to achieve this by toggling project switches or manually flipping all animation clips, which is cumbersome. I hope the official team could add a variable that detects whether the input direction key aligns with the character’s facing direction—this would greatly simplify creating turning animations.