Pickedentity query

Blitz3D Forums/Blitz3D Programming/Pickedentity query

Nexus6(Posted 2007) [#1]
Does anybody know how to clear pickedentity(), I want to reset pickedentity without having to click on a non pickable part of the screen.


Gabriel(Posted 2007) [#2]
Just do a linepick that you know won't hit anything?


Nexus6(Posted 2007) [#3]
Thanks Gabriel, that worked great.


bytecode77(Posted 2007) [#4]
pickedentity() returns the entity of the last succesful pick command

if you pick into the air, PickedEntity() will return the last picked entity!!!


Nexus6(Posted 2007) [#5]
Only if the "air" was pickable - which its not. i was hoping there was a command like flushkey() that did the equivalent for picked objects.


Vertigo(Posted 2007) [#6]
Um... create a cube called air and hide it, position it to like something wayyyyyyyyyyyyy out there and pick it... you can now rule out air as being pickable and if anything but air was picked, do your magic? haha


bytecode77(Posted 2007) [#7]
or you make the skybox pickable as in half life!
(but make it big and attach it to the camera!)


Sledge(Posted 2007) [#8]
RTFM like Gabriel does :P A failed pick will return zero and pass that value on to PickedEntity(). No need to complicate matters.


Vertigo(Posted 2007) [#9]
Hey Nexus asked if only air was pickable... I found a solution hehe. Your right though no need to make matters complicated.