Attachable animation controllers stay when swapping to other items
Partner Rank: 3
Verification builds: 1.19.80, 1.20.0
Summary:
The animation controller of an attachable stays around and continues to work and play sounds after switching to a differnt attachable without an animation controller
Impact:
Causes unintended effects to play and requires dummy animation controllers on all attachables to fix that potentially reduce performance
Repro steps:
- Import the attached world
- Give yourself "noxcrew.test:item_one" and "noxcrew.test:item_two"
- Right click / use "noxcrew.test:item_one"
- Swap to "noxcrew.test:item_two" right click / use it
- observe the sound from "noxcrew.test:item_one" continuing on "noxcrew.test:item_two" that lacks any animations
- Right click / use "noxcrew.test:item_one" again
- Swap to a crossbow (a default attachable) and right click / use it and observe the sound from "noxcrew.test:item_one" doesn't play
Observed Results:
Sounds from the first attachable's animations will continue to play on the second attachable
Expected Results:
The animation and animation controllers to no longer work when swapping attachables
Screenshots/Videos attached:
Yes
Regression builds:
unknown
Notes
The animation controller for the attachable stays visible and working in the animation editor when you swap from the first attachable item to the second.
When using a query such as query.is_using_item in the animation controller of the first attachable to play an animation with a sound, said sound will be heard when using the first attachable but continue to be heard when using a second attachable that lacks an animation controller.
Screenshots explained:
"item one" the first item has an animation controller and it shows in the animation editor
"item two" holding the second item which has no animations or animation controllers but item one's animation controller is still there and working