Sets entity picking mode (controls ray-cast intersection, recursive to children). Takes entity (entity handle), mode (picking mode flags), recursive (1=apply to children, 0=entity only). Returns nothing. Validates entity exists, sets entity->pickMode=mode, if recursive!=0 applies mode to all children recursively. Controls whether entity responds to ray-cast picking functions.
This function configures picking.
Sets entity picking mode (controls ray-cast intersection, recursive to children). Takes entity (entity handle), mode (picking mode flags), recursive (1=apply to children, 0=entity only). Returns nothing. Validates entity exists, sets entity->pickMode=mode, if recursive!=0 applies mode to all children recursively. Controls whether entity responds to ray-cast picking functions.
This function configures picking. Pick modes: mode controls which picking functions can hit this entity (b3dCameraPick for screen picking, b3dEntityPick for forward ray-cast, b3dLinePick for arbitrary rays), mode is flag-based (0=not pickable, non-zero=pickable, exact flag values TBD by picking system). Recursive application: if recursive=1, applies mode to entity and all descendants (traverses entire child hierarchy), if recursive=0, applies mode to entity only (children retain their own pick modes). Use cases: (1) Click selection (set mode=1 for clickable objects, mode=0 for scenery), (2) Interaction (enable picking for doors/buttons, disable for walls), (3) Transparency (disable picking for invisible objects), (4) Layers (disable picking for background objects), (5) Editor tools (toggle picking for selection tool). Common patterns: pickable b3dEntityPickMode(entity, 1, 0), not pickable b3dEntityPickMode(entity, 0, 0), recursive disable b3dEntityPickMode(rootEntity, 0, 1) to disable entire hierarchy. Typical usage: set mode=1 for interactive objects (enemies, items, doors), mode=0 for non-interactive (terrain, skybox, effects), use recursive=1 for models with multiple parts (disable picking on entire character). Picking workflow: (1) Set pick modes for all entities, (2) Call b3dCameraPick/EntityPick/LinePick to ray-cast, (3) Picking functions only test entities with non-zero pickMode, (4) Retrieve picked entity with result functions. Performance: O(1) for non-recursive (simple field assignment), O(N) for recursive where N=descendants (traverses entire child tree, potentially expensive for large hierarchies). Default pick mode: entities default to pickable (likely mode=1, verify during testing), must explicitly disable for non-interactive objects. Related: b3dCameraPick performs screen picking (ray from camera through screen point), b3dEntityPick performs forward ray-cast (ray from entity forward direction), b3dLinePick performs arbitrary ray-cast (custom origin/direction).