- Home /
Record Animation Clip from changes made with Mesh API?
I'm using the Unity mesh API to move vertices and recalculate normals. Now, I want to release on a platform with strict CPU limitations, and I cannot animate via Mesh API anymore. Is there anyway I can record an Animation Clip at runtime from a mesh being modified via the Mesh API?
Answer by Cherno · May 04, 2015 at 08:26 AM
If you don't want to use regular animation clips, you will have to code your own animation clip recording and playback system. It's actually not that hard, you basically need a class that holds all required data for a clip and a class for a single frame, with an arra of Vector3 to hold the vertex positions at that frame... You can also try to emulate keyframes so you don't have to save the vertex positions of every frame, instead adding a delay value and using Vector3.Lerp to go from one position to the next.
Your answer
Follow this Question
Related Questions
Manipulate Mesh Vertices 0 Answers
Getting the world position of mesh vertices? 2 Answers
MeshCollider is not getting updated when adding vertex to mesh 1 Answer
How to return from shader the indexes of triangles/vertices that was actually rendered? 1 Answer
Open 2D animation clip from Project Pane 0 Answers