Sets per-entity quad ray direction override (forces rays in specific direction regardless of mesh orientation).
Takes handle (quad ray source entity handle), pitch/yaw/roll (direction in degrees, Euler angles).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
handleInt
pitchDouble
yawDouble
rollDouble
Returns
Void
Quick Summary
Sets per-entity quad ray direction override (forces rays in specific direction regardless of mesh orientation).
Takes handle (quad ray source entity handle), pitch/yaw/roll (direction in degrees, Euler angles).
Returns nothing.
Technical Exegesis...
Sets per-entity quad ray direction override (forces rays in specific direction regardless of mesh orientation). Takes handle (quad ray source entity handle), pitch/yaw/roll (direction in degrees, Euler angles). Returns nothing. Sets entity.quadRayDirection (per-entity direction override, stored as XMFLOAT3 pitch/yaw/roll).
Sets per-entity quad ray direction override (forces rays in specific direction regardless of mesh orientation). Takes handle (quad ray source entity handle), pitch/yaw/roll (direction in degrees, Euler angles). Returns nothing. Sets entity.quadRayDirection (per-entity direction override, stored as XMFLOAT3 pitch/yaw/roll). Use to force ray direction (override mesh orientation, point rays in specific direction), animate ray direction (rotate rays over time, searchlight effect), or decouple mesh from ray direction (mesh faces one way, rays cast another). Direction override: if set (non-zero pitch/yaw/roll), rays cast in specified direction (ignores entity.rotation and mesh orientation), if not set (0,0,0 default), rays cast based on mesh shape and entity.rotation (normal behavior). Per-entity setting: each quad ray source has independent direction (customize per light, sun downward while spotlight rotates), direction stored as Euler angles (pitch = X rotation, yaw = Y rotation, roll = Z rotation), applied in rendering (shader uses direction to trace rays from occlusion pixels). Use cases: (1) Sunlight rays (set pitch -45, yaw 0, roll 0 for downward slanting sun rays regardless of mesh orientation), (2) Animated searchlight (animate yaw 0-360 over time for rotating searchlight beam), (3) Fixed spotlight (set direction once, mesh can move but rays point same direction), (4) Decoupled orientation (mesh billboard faces camera, but rays cast in fixed world direction). Common patterns: downward sun = pitch -45, yaw 0, roll 0 slanting sunlight; forward beam = pitch 0, yaw 0, roll 0 horizontal forward; rotating searchlight = yaw = yaw + 1.0 per frame animate rotation. Typical values: downward (-90,0,0 straight down), slanting (-45,45,0 diagonal sun), horizontal (0,90,0 side beam), upward (90,0,0 ground-to-sky). Euler angles: pitch = rotation around X axis (up/down tilt, -90 down, 0 horizontal, +90 up), yaw = rotation around Y axis (left/right rotation, 0 forward, 90 right, 180 back, 270 left), roll = rotation around Z axis (barrel roll, usually 0 for lights). Coordinate system: right-handed Y-up (X right, Y up, Z forward), angles in degrees (not radians), applied as rotation matrix (converted to direction vector in shader). Direction vs mesh orientation: mesh orientation defines occlusion silhouette (how mesh blocks rays), direction override affects ray casting (where rays point from occlusion pixels), useful when mesh shape != desired ray direction (sphere mesh but want directional rays). Validation: only affects isQuadRaySource entities (non-quad-ray entities ignored), silent if entity not found (invalid handle no-op), accepts any angles (wraps around, 360 = 0, -90 = 270). Related: b3dLoadQuadRayMesh creates quad ray source (load mesh, then configure direction), b3dRotateEntity rotates entity (affects rays if direction not overridden), b3dSetQuadRaySpreadFactor controls ray spread (spread applied after direction, creates cone), b3dPositionEntity positions source (rays originate from entity.position, cast in direction).