co-ordinates of front of mesh?

Blitz3D Forums/Blitz3D Programming/co-ordinates of front of mesh?

slenkar(Posted 2004) [#1]
Is it possible to get the world co-odinates of the front of a mesh (or top, bottom) etc,

or is it possible to get the entityradius of an entity during the program?


Gabriel(Posted 2004) [#2]
Erm.. define front? It's 3d, everything is the front depending on your perspective. How complex is the object? YOu could linepick from the perspective you're talking about towards the mesh and get the PickedX#, PickedY# and PickedZ#, but I'm really not sure if that's what you mean.


N(Posted 2004) [#3]
Some badly written code...

P = CreatePivot()
PositionEntity P,EntityX(Entity),EntityY(Entity),EntityZ(Entity)
RotateEntity P,EntityPitch(Entity),EntityYaw(Entity),EntityRoll(Entity)

If Upper(EntityClass(Entity)) = "MESH" Then   ;this won't work in the majority of situations, trust me
     MoveEntity P,0,0,MeshDepth(Entity)/2   ;world 'front'
     ;MoveEntity P,0,MeshHeight(Entity)/2,0  ;world 'right'
     ;MoveEntity P,MeshWidth(Entity)/2,0,0   ;world 'top'
EndIf


Chances are this wouldn't work at all. *shrug*
Just trying to help.


slenkar(Posted 2004) [#4]
ah thanks, I made sure my ships were boxy so things like this would come in useful