Skip to content

Commit 59cf582

Browse files
StarveldtIgnisRBX
andauthored
Clarify how AnimationTrack:Stop() with a fadeTime of 0 affects Motor6Ds (#1036)
## Changes When calling `AnimationTrack:Stop()` with a fadeTime of 0, poses do not freeze under all circumstances. It happens due to the `MaxVelocity` of Motor6Ds in the rig being zero, meaning they cannot return back to their desired angle (since they inherit Motors). I believe the misconception in the passage I edited was due to the default StarterCharacter rigs having the MaxVelocity of all joints set to zero rather than something like tau (which should be optimal, given MaxVelocity is in radians). I've also tested this below. Rig with MaxVelocity set to 0 for all Motor6Ds, calling `AnimationTrack:Stop(0)`: ![RobloxStudioBeta_aAWKhiW44t](https://github.com/user-attachments/assets/5ba4f82d-5300-483f-94c5-e952be078998) Rig with MaxVelocity set to tau for all Motor6Ds, calling `AnimationTrack:Stop(0)`: ![RobloxStudioBeta_erHkiFJMix](https://github.com/user-attachments/assets/80ca2302-5156-4688-b1ba-f523c31032c8) Bones are not affected by this issue since they do not inherit Motor. ## Checks By submitting your pull request for review, you agree to the following: - [x] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [x] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [x] To the best of my knowledge, all proposed changes are accurate. --------- Co-authored-by: IgnisRBX <[email protected]>
1 parent cb7a39c commit 59cf582

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

content/en-us/reference/engine/classes/AnimationTrack.yaml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -601,24 +601,21 @@ methods:
601601
writeCapabilities: []
602602
- name: AnimationTrack:Stop
603603
summary: |
604-
Stops the `Class.AnimationTrack`. Once called playback of the
605-
`Class.AnimationTrack` will stop and the weight of the animation will move
606-
towards zero over a length of time specified by the optional fadeTime
607-
parameter.
604+
Stops the `Class.AnimationTrack`.
608605
description: |
609-
Stops the `Class.AnimationTrack`. Once called playback of the
610-
`Class.AnimationTrack` will stop and the weight of the animation will move
611-
towards zero over a length of time specified by the optional fadeTime
612-
parameter.
613-
614-
For example, if Stop is called with a fadeTime of 2 seconds it will take
615-
two seconds for the weight of the `Class.AnimationTrack` to reach zero and
616-
its effects completely end. Please note this will be the case regardless
617-
of the initial weight of the animation.
618-
619-
It is not recommended to use a fadeTime of 0 seconds to try to override
620-
this effect and end the animation immediately as presently, this causes
621-
the `Class.AnimationTrack` poses to freeze.
606+
Stops the `Class.AnimationTrack`. Once called, the weight of the animation
607+
will move towards zero over a length of time specified by the optional
608+
`fadeTime` parameter. For example, if `Stop()` is called with a `fadeTime`
609+
of `2`, it will take two seconds for the weight of the track to reach
610+
zero and its effects completely end. Please note this will be the case
611+
regardless of the initial weight of the animation.
612+
613+
It is not recommended to use a `fadeTime` of `0` in an attempt to override
614+
this effect and end the animation immediately for `Class.Motor6D|Motor6Ds`
615+
that have their `Class.Motor.MaxVelocity` set to zero, as this causes
616+
the joints to freeze in place. If it must end immediately, ensure the
617+
`Class.Motor.MaxVelocity` of `Class.Motor6D|Motor6Ds` in your rig are
618+
high enough for them to snap properly.
622619
code_samples:
623620
- AnimationTrack-Stop
624621
parameters:

0 commit comments

Comments
 (0)