line pick

Blitz3D Forums/Blitz3D Beginners Area/line pick

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

It's simple. THe entities you may pick must have their pickmode set, see ENtityPickmode.

Everything else is explained in http://www.blitzbasic.com/b3ddocs/command.php?name=LinePick&ref=goto

cube1=createcube()
positionentity cube1,0,0,50
entitypickmode cube1,2

pick=linepick(0,0,0,0,0,100)

if pick=cube1 then print "picked the cube mesh"


see also:
http://www.blitzbasic.com/b3ddocs/command.php?name=pick&ref=goto