I have a Triangle class and a list of triangles representing my 3D model shape.
When I update the position, the rotation or the scale of my model, I also want my triangles list to be updated.
I already made the function to update triangle position, but I can't make it for rotation/scale...
private void UpdateModelTrianglesPos(Vector3 oldPos, Vector3 newPos)
{
Vector3 diff = newPos - oldPos;
for (int i = 0; i < _trianglesPositions.Count; i++)
_trianglesPositions[i].UpdatePosition(diff);
}
Thank you for your help!