I am trying to build an iPhone game with sea waves. For that I need to know if Unity for iPhone supports vertex animations, and if yes then what is the way to do it. It would be great if you could point me to any useful resources.
I am familiar with the Unity interface and have done a 3D third person shooter game using Unity for iPhone. So if you can point me in the write direction, I would be able to figure out the details on my own.
Thanks in advance.
Mesh based animation must be done through script and the Mesh class.
Unity has highly optimized VFP based animation through bones, thats the only type of animation supported that “deforms the mesh in any way”.
Forgive me for being ignorant, but what does VFP stand for, and how can I make use of it in Unity (which classes or methods).
you can not use the vfp.
The engine uses it to optimize vector calculations where it raises the performance (especially skeletal animations)
the vfp is a distinct chip in the iphone that is optimized for vertex ops
You can do vertex animation with Unity with reasonable performance.
-
in your class
private Mesh mesh;
private Vector3[ ] vertices;
-
in your Start
void Start()
{
mesh = (MeshFilter)GetComponent(typeof(MeshFilter)).mesh;
vertices = new Vector3[mesh.vertices.Length];
}
-
in you Update
Update()
{
for(int i =0; i != vertices.Length;++i)
vertices = turn your imagination on;
mesh.vertices = vertices;
}