As you may be able to tell from this screenshot, I am trying to make a physics engine for a platformer I am working on, but I have run into a definite problem: I need to be able to find out the angle of any one of the triangles that you can see make up this mesh, so that I can work out the rotation and therefore angular acceleration of the player on that triangle.
I can use an algorithm that I created to find the locations of all 3 points of any triangle that the player is in contact with, but I don't know how to use those points to work out the rotation of the triangle.
By the rotation, I mean the direction of the normal away from the centre of the face, i.e., the angle at which a person would be leaning if they stood on that surface. Can someone come up with a series of equations that will allow for this problem to be solved?