LinePick confusion

Blitz3D Forums/Blitz3D Programming/LinePick confusion

Warren(Posted 2003) [#1]
LinePick is driving me to drink. :) I understand that I give it a starting location and then give it the direction ... I assume this is a directional vector. Does it need to be normalized? Do I tell it exactly how far to check along each axis?

Is there a reason it wasn't just coded simply with a start and end location?

At any rate, no matter what I try, I always seem to get a result of zero. Is there set up work that needs to be done before LinePick will function?


GfK(Posted 2003) [#2]
Your entities have to be pickable (see EntityPickMode).


fredborg(Posted 2003) [#3]
The dx,dy,dz parameters, tell how far in each direction it should go. You could normalize the vector and then multiply each component by the distance you want to pick, or subtract the starting point from the ending point.

I think the reason it's not just a starting point, and an ending point is that it uses a delta vector internally...


Warren(Posted 2003) [#4]
Ah, danke! That sounds like the piece I was missing ...