re-center a mesh
BlitzMax Forums/MiniB3D Module/re-center a mesh
| ||
I've got a mesh I'm loading from a file, but the mesh data isn't centered properly, can anyone recommend a way to re-center the mesh? |
| ||
If the mesh is loaded with LoadMesh, you can use:w#=meshwidth(mesh) h#=meshheight(mesh) d#=meshdepth(mesh) FitMesh mesh,-w/2.0,-h/2.0,d/2.0,w,h,d If the object is loaded with LoadAnimMesh, things are more complicated, because it can consist of more than one mesh. |
| ||
FITMESH! I knew I saw it somewhere before, thank you thank you! |