i want my image can follow anim's translation 、rotation 、scale and shear,but BoneFollowerGraphic cant follow shear.
Is there a way to follow spine shear anim in unity?
I need the same kind of help!
@1632903428 @jiangjiang I'm afraid there is no way to set the Transform
matrix manually, which would be required to include shear.
The only way I can see is to create a component with a 4x4 matrix, set it up to include shear and apply it to a target mesh manually (i.e., transform each vertex of the mesh).
As this is a Unity limitation, you could ask on their forums, but I'm afraid that there is no good solution available yet, as discussed here for example:
https://forum.unity.com/threads/skewing-or-shearing-a-mesh-gameobject.38894/
Harald thanks for your reply ,I tried to transform vertex of image,But it doesn't have the same effect as my anim.
I'll keep looking for other ways.emm,Maybe I should change my mind.
1632903428 I tried to transform vertex of image,But it doesn't have the same effect as my anim.
How did you query the shear value of the bone and how did you apply this shear to your image's mesh vertices?
Anyway, likely it's much easier to use a different solution than to "force" shear into Unity components. If you tell us what are you trying to achieve on a higher level, and what you setup of involved GameObjects and components in Unity is, we could perhaps suggest a suitable solution.
Harald
Well,I made a page turning animation of a book,use spine shear tool to Make this effect. In unity, I have some pictures Generated in game.I'm trying to Glue the picture to the book,While the pages of the book are turning,these picture can follow shear ,It's like they're part of the content of the book.
@1632903428 I see, thanks for the clarification. I'm afraid it will not be that easy to find a workaround for such an image distortion then. Perhaps it would indeed be best to create a custom Component which reads the shear value of a bone and applies it to mesh vertices as mentioned in the posting above.
Harald @jiangjiang
Thanks for your help,I've solved the problem by replace solt attachment .I find this in spine other example ,Which can "equip" my book with sprite.
1632903428 cool!
@1632903428 Thanks for getting back to us, very glad to hear you've found a solution.