Help with LinePick?

Blitz3D Forums/Blitz3D Programming/Help with LinePick?

martonic(Posted 2004) [#1]
Hi! Can anyone provide a working example of LinePick? I am setting EntityPickMode, etc. but it always returns 0. Thanks!


jfk EO-11110(Posted 2004) [#2]
here it works

result=linepick(x,y,z,x2-x,y2-y,z2-2,0.1)

where x,y,z is the start position and x2,y2,z2 is the end position of the pick. Or use w,h,d instead of x-x2 etc.

Isn't there an example in the docs?

You can also check if things are working correctly, when you use Camerapick with mouseX/Y.

Example:

cube=createcube()
entitypickmode cube,2

p=linepick(0,0,-10,0,0,20,.1)
print p
waitkey()


martonic(Posted 2004) [#3]
Thanks. There is no example anywhere in the Documents, Samples or Tutorials (including the second set).

Your example works (in isolation) but I still get nothing but zero's back when using LinePick in the context of an FPS. Wish I knew why!


jfk EO-11110(Posted 2004) [#4]
probably a lil typo somewhere.