10 Months Ago
Citizen/animgraph: prevent animation hitches that could happen when strafing back and forth or changing directions (see commit comment) + improved noclip blend In order to have movement cycles always start from the same phase (left foot passing the right foot), the state machine in charge of tagging would send a reset signal every time the movement speed would go from under 2 u/s (defined as idle) to above 2 u/s (or 100 u/s in one tick). However, strafing back and forth or changing directions could satisfy these conditions right away, and the received signal would not only reset the 2D Blendspace, but also the newer lean layers, creating a visible hitch. The implemented solution is a second set of state change conditions. The current conditions still exist, but don't send a reset signal anymore. The new set of conditions can still send a reset, but they also require to have spent at least 250ms under 2 u/s first. The defined transition priority order now sets the newer set of conditions to the first slots, to then make sure the time condition can always get evaluated first.