b3dCameraPick

Ray-casts from screen coordinates into 3D world (stores result, retrieve with b3dPickedEntity/X/Y/Z/NX/NY/NZ). Takes camera (camera entity handle), screenX/screenY (screen pixel coordinates). Returns nothing.

3D Graphics

Parameters & Returns

Parameters

camera Int
screenX Double
screenY Double

Returns

Void

Quick Summary

Ray-casts from screen coordinates into 3D world (stores result, retrieve with b3dPickedEntity/X/Y/Z/NX/NY/NZ). Takes camera (camera entity handle), screenX/screenY (screen pixel coordinates). Returns nothing.

Technical Exegesis...

Ray-casts from screen coordinates into 3D world (stores result, retrieve with b3dPickedEntity/X/Y/Z/NX/NY/NZ). Takes camera (camera entity handle), screenX/screenY (screen pixel coordinates). Returns nothing. Validates camera entity, resets g_lastPickResult, builds view/projection matrices, unprojects screen coords to world-space ray, tests ray against all mesh entities respecting pickMode (0=sphere, 1=box, 2=polygon), stores closest hit in g_lastPickResult. Mouse picking for click selection.

Example

Example.bam
; No example implemented yet