try using my scale animmesh fuction:
get it here: http://www.blitzbasic.com/codearcs/codearcs.php?code=1430 It allows you to scale an anim mesh using the actual 3dunit system rather than a scale factor. So the mesh will always be (for example 1x2x1 3d units)
Also, ive got darkmatter too, the root axis (or pivot point, hotspot or whatever it gets called these days) of the mesh is at the feet, so you need to place a pivot in the center if you want a collision radius to work.
Something like
;create our (real) hero
hero=createpivot()
;load the visible part of the hero
herosbody=loadscaledanimmesh("yourmesh.b3d",2,2,2)
;atatch it to the pivot
entityparent herosbody,hero
;then move the body down do piv is in the middle
moveentity herosbody,0,-1,0
;then if collisions are needed apply it to the pivot.
entityradius hero,2,2
entitytype hero,type__hero
Now all you need to do is position & rotate the pivot rather than the mesh, and its reference point will be central :)
|