Hi.
Neat work, but this isnt scaling the Mesh as such, it's scaling the Entity. Confused me. :)
Still very useful though :D
Neat work, but this isnt scaling the Mesh as such, it's scaling the Entity. Confused me. :)
Still very useful though :D
| This loads a 3ds file to a set blitz unit size it *should* take any animated mesh, although ive only tested it on 3ds. (I think it works anyway :) |
Function loadscaledanimmesh(filename$, sx#,sy#,sz#) ;Size in blitz units not percent!! ;By Dan @ D-Grafix ;useage : mesh=loadscaledanimmesh(file$,width,height,depth) ;create scaler and mesure static mesh scaler=LoadMesh(filename) mesh_SX# =MeshWidth(scaler) mesh_SY# =MeshHeight(scaler) mesh_SZ# =MeshDepth(scaler) ;and bin it FreeEntity scaler ;load 'real' mesh mesh=LoadAnimMesh(filename) ;do some maths Xscale# = ((100/mesh_SX) * sx) / 100.0 Yscale# = ((100/mesh_SY) * sy) / 100.0 Zscale# = ((100/mesh_SZ) * sz) / 100.0 ;scale it ScaleEntity mesh,Xscale#,Yscale#,Zscale# ;return it Return mesh End Function |