Method RotateMesh(pitch#,yaw#,roll#) pitch#=-pitch# Local mat:TMatrix=New TMatrix mat.LoadIdentity() mat.Rotate(pitch#,yaw#,roll#) TransformMesh(mat) ' set new_bounds to true so MeshWidth/Height/Depth will get new width/height/depth values next time it's called new_bounds=True UpdateBuffer() End Method
The local matrix is only used within the function to transform the mesh's vertices, the entity's own matrix is unaffected.