mkrebser / GPUInstance

Instancing & Animation library for Unity3D
Other
228 stars 44 forks source link

SetAnimation state start time seems to be reusuing previous state progress time/percentage. #21

Closed kaisunc closed 1 month ago

kaisunc commented 1 month ago

I have a test scene where the skinned mesh and gpu mesh is under the same object.

The gpu mesh animation uses the previous states progess as the start time.

For example, after starting, the animation for both gpu and skinned_mesh goes into Running. This syncs fine.

But if i change animation state to "Death" after Running animation is 50% through, the gpu mesh "Death" animation starts at 50%. If I change animation state to "Death" immediately at 0% Run progress, the gpu mesh Death animation syncs with skinned mesh Death animation.

I suspect ticks calculation in InstanceData is messed up somewhere.