i have generated a simple mesh. but when i try to rotate it by say 90 it actually gets rotated by 180. i cant seem to figure it out why?
ok so i pinpointed the problem in this part of code.
this code constantly updates the mesh vertices according to the gameobject vertices so that i can deform the face whenever i move a vertex.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DeformFace : MonoBehaviour
{
public Face face;
public List<Vertex> sharedVertices=new List<Vertex>();
Mesh mesh;
public List<Vector3> meshVertices=new List<Vector3>();
private void Start()
{
sharedVertices=face.sharedVertices;
for (int i = 0; i < sharedVertices.Count; i++)
{
meshVertices.Add(sharedVertices[i].transform.position);
}
mesh =GetComponent<MeshFilter>().mesh;
}
private void Update()
{
DeformingFace();
}
public void DeformingFace()
{
for (int i = 0; i < sharedVertices.Count; i++)
{
meshVertices[i] = sharedVertices[i].transform.position-transform.position;
}
mesh.vertices = meshVertices.ToArray();
}
}

And now we should magically figure out what you did wrong in your code that you didn't show? My guess is that you probably rotated the vertices as well as the object, but how should we know what you did?
– Bunny83