Sets entity sphere radius (for picking and collision detection).
Takes entity (entity handle), radius (sphere radius in world units).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
entityInt
radiusDouble
Returns
Void
Quick Summary
Sets entity sphere radius (for picking and collision detection).
Takes entity (entity handle), radius (sphere radius in world units).
Returns nothing.
Technical Exegesis...
Sets entity sphere radius (for picking and collision detection). Takes entity (entity handle), radius (sphere radius in world units). Returns nothing. Validates entity exists, sets entity->collisionRadius=(float)radius. Defines sphere bounding volume for collision and picking operations.
This function sets collision sphere.
Sets entity sphere radius (for picking and collision detection). Takes entity (entity handle), radius (sphere radius in world units). Returns nothing. Validates entity exists, sets entity->collisionRadius=(float)radius. Defines sphere bounding volume for collision and picking operations.
This function sets collision sphere. Sphere radius: defines spherical bounding volume centered at entity position, used for sphere-sphere collision detection, used for sphere ray-cast picking (ray intersects sphere), complements AABB bounding box (box for frustum culling, sphere for simple collision). Use cases: (1) Collision detection (sphere-sphere tests for proximity, faster than AABB-AABB), (2) Picking (ray-sphere intersection for click selection), (3) Trigger volumes (detect when entities enter sphere), (4) LOD distance (switch detail levels based on sphere distance), (5) Audio attenuation (sound falloff based on sphere radius). Common patterns: character radius b3dEntityRadius(player, 0.5), projectile radius b3dEntityRadius(bullet, 0.1), explosion radius b3dEntityRadius(explosion, 5.0). Typical usage: set radius to approximate entity size (character height/2, projectile size), use for fast collision detection (sphere tests before expensive mesh tests), use for picking (ray-sphere intersection). Sphere vs AABB: sphere good for roughly spherical objects (characters, balls, planets), AABB (b3dEntityBox) good for box-shaped objects (buildings, crates), many entities use both (AABB for frustum culling, sphere for collision). Radius units: world units matching entity position scale (radius=1.0 is 1 unit in world space), affected by entity scale (actual collision sphere = radius * entity scale). Performance: O(1) assignment (simple field set, no computation). Default radius: likely 0.5 or 1.0 (verify with b3dGetEntityRadius, check default in entity initialization). Related: b3dGetEntityRadius retrieves current radius, b3dEntityBox sets AABB bounding box (alternative/complementary bounds), b3dEntityPickMode enables/disables picking.