Created a gun animation (holding, shooting, reloading) entirely as one AnimationTrack. I’m aware I can do these animations separately, and load and play them separately. But my goal is to use one track to do multiple different ones.
I’m wondering if anyone knows whether this is possible, or otherwise even a good idea.
I’ve somewhat done it by using markers and storing the timeposition of each needed marker. But the timeposition is off by a small amount. When I need an animation to play I just set the timeposition and speed.
Animation atlases are just as useful as texture or sound atlases. I think they’re great done right, just a small amount of overhead needing to define keyframe points to start/stop at.
You can simplify what you’ve attempted by storing time intervals by using AnimationTrack:GetTimeOfKeyframe (roblox.com) instead. This would let you just name a keyframe like “shoot”, “idle”, “reload” inside your animation and fetch its time using the same names. You could cache them too but I don’t think performance considerations would deem it necessary unless you had many animation cells in your atlas.