![]() ![]() ![]() The only other thing I can think of is setting direction=1 then polling the animation state every frame until it changes, before setting direction back to 0. This feels like a hack when clearly this is what Any State was intended to simplify. The obvious solution is to add transitions between every single state and the 4 run states. If I set the exit time flag on the 4 Any State transitions, then animations would finish their loops before changing, which would work, but take too long making movement feel sloppy and unresponsive. Unfortunately with a transition time, if that direction=1 happens during a transition, it will be missed. If I had a 0-second transition time, I could make direction=1 only for a single frame to indicate a change in state, then immediately set it back to 0. The problem is that Any State includes the current state, so if direction=1 and moving=true, the transition from Any State to WalkUp will fire over and over, without letting WalkUp finish its loop. No transitions have exit time (they don't require a loop to finish), but all have an overlapping transition time (blending between states). I have a 4-directional 2D animation controller (using Spine2D animations):ĭirection: 1 is up, 2 is right etc. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |