Picked length?

Blitz3D Forums/Blitz3D Programming/Picked length?

slenkar(Posted 2004) [#1]
I am scaling a laser using entity distance which works fine,

EXCEPT when an entity is large it scales the laser to its centre which is too far.

How do I fing the distance from the start of the pick to the end of the pick?


Bot Builder(Posted 2004) [#2]
Pythagorean Therom:

d#=sqr((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2))

Where x1,y1,z1 us the start point of the pick, and x2,y2,z2 is the end point. (you obtain endpoint by PickedX(),PickedY(),and PickedZ())


slenkar(Posted 2004) [#3]
ah o.k. thanks