Limit CameraPick to the CameraRange ??

Blitz3D Forums/Blitz3D Programming/Limit CameraPick to the CameraRange ??

jfk EO-11110(Posted 2007) [#1]
Is it possible to limit the pick range of a camera pick to the current camera range, eg. 10 to 20 ?

Right now it seems it´s not working. Probably I need a substitute then... :/


Shambler(Posted 2007) [#2]
Doesn't look like it.

But you could either ignore camera picks that are more than e.g. 10 to 20 or simulate your own camerapick with linepick.


jfk EO-11110(Posted 2007) [#3]
I´d have to do a lot of transformation with linepick :o). Right now I solved it this way; a big helper quad is aligned to the triangle I want to pick, then moved slightly towards the camera. Pickmode for the main mesh is deactivated, for the quad activated, then I camerapick the quad, position the camera at pickedxyz, swap the pickmodes of quad and mesh and do a further camerapick. Probably this is even faster since most of the picking range is done with only one pickable quad in the scene.

And yes, I need this to scan the triangles of a mesh in order to lightmap it.


b32(Posted 2007) [#4]
I thought it was a nice problem, so I tried to figure it out. This routine imitates the CameraPick with a LinePick. It uses CameraPick to initialize, and later on, it interpolates these coords to use it on LinePick:

And if you want to adjust the far/near variables realtime, you could interpolate between the start and end point of the picking line.


jfk EO-11110(Posted 2007) [#5]
That's useful thanks a lot!