Seanba / Aseprite2Unity

Import Aseprite files to Unity
MIT License
48 stars 10 forks source link

Scaling key frame time by frame rate. #9

Open aschearer opened 2 years ago

aschearer commented 2 years ago

I found that changing framerate had no effect on animation playback speed (testing in Unity 2020.3.25f1). Multiplying the key time offset by 1 second / frame rate fixes the issue.

Seanba commented 2 years ago

Hi there, @aschearer. The Frame Rate is more of a "resolution" of the animation but it sounds like what you need a scale modifier.

For many of my animations (old-school, like on a NES) I know the sprites only animate at 8fps so I'd use that value there. That way the animation system is sampling the animation at a lower rate (and, hopefully, increasing performance). That's what that field is used for.

But I can add an explicit multiplayer to scale animation playback speed if that's what you're after.

aschearer commented 2 years ago

I see, I think I must be hitting another issue or just not configuring things correctly because minus this change it didn't appear to matter how I set the FPS -- the animation always played back very quickly (it's a 2-3 frame animation). Will experiment some more...

Seanba commented 2 years ago

If you're still having issues send me your Aseprite file and I'll take a look. My email is sean@seanba.com