Distance

Blitz3D Forums/Blitz3D Programming/Distance

cash(Posted 2004) [#1]
I am using entitydistance instead of collisions for several parts of my game.

If I map out my level and then save all the separate parts of the model separately in the correct locations, it loads in perfectly and everything is exactly in the right place.

However entitydistance goes completely wrong, ie when up close I am getting a distance of 400 - 500 etc. Unless I save each part of the model in the "CENTRE" location of
my 3d application, the distances do not calculate correctly.

Is this normal, its just that being able to build the model in one go and then saving the various parts ensures correct location.


Ross C(Posted 2004) [#2]
Well, EntityDistance works by getting the distance between the centre of two objects, as it doesn't know where the ojbects are placed. So if you central axis isn't anywhere near the centre of the model, i'm pretty sure it will give you a reading for central axis, to central aixs :)

You could use pivots, and place them at the centre of each object?