Just a side note, in case you don't know: you can use a BoundingBoxFollower to have a PolygonCollider adapt to a Bounding Box defined in the Spine editor every frame.
Regarding your question:
We absolutely do not recommend to reinvent the wheel and write your own code to re-transform every vertex of the mesh every frame. Since you mentioned "in order to have next position": Is the mesh state of the current frame not an option? We would suggest to get the mesh from the MeshFilter after SkeletonRenderer's LateUpdate()
call. You might want to configure your script execution order to run after SkeletonRenderer
and SkeletonAnimation
.
If you really need the next frame, we would rather suggest to either derive your own subclass from SkeletonAnimation
and generate your own additional "next frame" mesh accordingly (see code in SkeletonRenderer
) or have a second invisible copy of your SkeletonAnimation object that is set to one frame ahead.