We’ve enabled some internal changes in our animation system on desktop just now.
Specifically:
Much faster implementation (5-10x faster depending on the complexity of the rig)
Pose.MaskWeight is no longer supported
Some blending bugs have been fixed (Polyguns! \o/ @x_o)
Blending behavior has changed in some cases (Edit: This is no longer the case - behavior closely matches what used to be the case)
This is no longer relevant - please disregard
The most likely change that you may witness is #4. Previously, if you played 5 looped animations of the same priority with weight 1, we'd just use the last one you played. Now we blend all animations with the same priority together with a weighted blend - so if you play 5 animations with weight 1, they all have equal weight so the result is (A+B+C+D+E)/5. The way to resolve this is to play the animation you want to see blended "over" in a higher priority layer.
One prominent case where #4 may appear is if you forget to stop your animation tracks and just play new ones. Now you’ll see a blended motion that will look weird - however, please note that not stopping your looped animation tracks is really bad for performance since we never stop them for you! So this is something you should fix anyway (you can check which animation tracks are playing using Documentation - Roblox Creator Hub)
Sometimes this will happen if you replace our default Animate script by removing the old one and reparenting the new one. In this case there may be animations that the old script has started but are still playing. A better way to do this is to put your custom script into the StarterPlayer/StarterCharacterScripts and naming it ‘Animate’. This will automatically replace the default one without even starting it.
Please comment on this thread if you see any issues with the update.
With this change, I think we need more priority levels for animations. Prior to the change it wasn’t so much of a problem because if you played animations with the same priority, the latest animation would in theory be priority level current+1, allowing you to have infinite levels of priority – you could keep playing animation on top of animation. With this update, if you want that behavior, you either have to increase the priority level, or keep track of the order all animations are played in + stop all current animations playing when a new one is played at the same priority level + manually keep track of their current play time + whenever the current animation stops, find the last played animation that is still running and start it at stoppedTime+elapsedTime. The latter of the two is a lot more to do than was previously needed, and if someone is using the default ROBLOX animations (most games), they only have three priority levels to work with for the former approach. Core’s (highest priority) enum number is 1000, so there should be plenty of room to expand.
Keeping playing animation on top of animation is a bad habit though - this increases (potentially infinitely!) the number of concurrently played animations. We actually had a problem like this with a toolbox model where the game would just get slower and slower over time.
When you replace the default Animate script it has already started some animations - usually idle. So when your new script destroys the old one it neglects to stop the animations the old script has started.
I’m not really sure if there’s a better way to replace the default Animate script (cc @CodeWriter) but a possible workaround would be to do this after you get the Humanoid object in your new script:
for _,v in pairs(Humanoid:GetPlayingAnimationTracks()) do v:Stop(0) end
You can replace the starting Animate script simply by putting your custom script into the StarterPlayer/StarterCharacterScripts and naming it ‘Animate’. This will replace the default script that gets added to all Humanoids with your new script before either starts.
Would be nice to have the option to turn off Blending mode in my game and revert it back to the previous version.
It made a pretty big impact on my game and the fans don’t like it
But you can fix it yourself by stopping animations when you override them with another, and then restarting them when necessary. Or using different priority levels, if you weren’t already.