VertexAnimation icon indicating copy to clipboard operation
VertexAnimation copied to clipboard

Multiple animators in the same scene

Open SergeyVolik opened this issue 3 years ago • 3 comments

Introduction

Hi there. I found a bug when I use two or more animated models in the same scene.

https://user-images.githubusercontent.com/29128689/154809559-3fd64ed9-9985-4996-8720-5b6c4035fa9f.mp4

I have decided to figure it out. I found a problem in VA_AnimationLibraryComponentAuthoring. You use static field https://github.com/maxartz15/VertexAnimation/blob/4499f67f3122b1c6a8def5c4b7ad431d79791cb6/Runtime/Scripts/VA_AnimationLibraryComponentAuthoring.cs#L17 for all animated models.

Solution

I have rewrote this logic and now I generate Hash128 for each animation library VA_AnimationLibrary.cs. By the way Hash128 work only with guid strings.

Result

https://user-images.githubusercontent.com/29128689/154811015-4a54b498-c014-4c79-8e8a-0b857ade0ada.mp4

I also updated the old samples and added the sample 4 scene.

SergeyVolik avatar Feb 19 '22 17:02 SergeyVolik

You can have multiple animations/animated models already. Currently you can only have one loaded animation library. This animation library can contain multiple animation books from all kinds of models. What would be the reason to have multiple animation libraries? If that is really needed, then I think we should remove the libraries al together and have the books load them self in.

maxartz15 avatar Feb 20 '22 16:02 maxartz15

You can read more here

maxartz15 avatar Feb 20 '22 16:02 maxartz15

@SergeyVolik does that solve your problem or is the change you made necessary/useful? (btw, thanks for looking at the project, much can be improved, keep the suggestions coming :) )

maxartz15 avatar Feb 22 '22 15:02 maxartz15