Returns entity roll rotation in degrees (Z-axis rotation, 0.0 if invalid).
Takes entity (entity handle).
Returns roll angle as Double (entity.rotation.z in degrees, 0.0 if entity doesn't exist).
3D Graphics
Parameters & Returns
Parameters
entityInt
Returns
Double
Quick Summary
Returns entity roll rotation in degrees (Z-axis rotation, 0.0 if invalid).
Takes entity (entity handle).
Returns roll angle as Double (entity.rotation.z in degrees, 0.0 if entity doesn't exist).
Technical Exegesis...
Returns entity roll rotation in degrees (Z-axis rotation, 0.0 if invalid). Takes entity (entity handle). Returns roll angle as Double (entity.rotation.z in degrees, 0.0 if entity doesn't exist). Validates entity exists, returns rotation.z directly (roll component of Euler angles), returns 0.0 if invalid handle. Query function for entity tilt/bank rotation.
This function retrieves entity roll angle.
Returns entity roll rotation in degrees (Z-axis rotation, 0.0 if invalid). Takes entity (entity handle). Returns roll angle as Double (entity.rotation.z in degrees, 0.0 if entity doesn't exist). Validates entity exists, returns rotation.z directly (roll component of Euler angles), returns 0.0 if invalid handle. Query function for entity tilt/bank rotation.
This function retrieves entity roll angle. Roll definition: rotation around Z-axis (tilt/bank left/right), positive roll = tilting right (clockwise when looking forward), negative roll = tilting left (counterclockwise when looking forward), measured in degrees. Return value: returns entity.rotation.z (stored as degrees, not radians), float converted to double, 0.0 if entity handle invalid. Euler angles: roll is Z component of pitch/yaw/roll rotation (entity.rotation = XMFLOAT3(pitch, yaw, roll)), combined with pitch/yaw to form complete orientation. Use cases: (1) Bank angle queries (check vehicle/aircraft tilt during turns), (2) Camera effects (Dutch angle, cinematic tilts), (3) Animation (check entity lean for procedural animation), (4) Physics feedback (display roll from physics simulation), (5) Constraints (limit roll to prevent excessive tilting). Common pattern: roll = b3dEntityRoll(entity), if abs(roll) > maxBank: clamp roll, or bankAngle = b3dEntityRoll(aircraft) for flight indicators. Typical usage: query roll for banking/tilting effects, use for vehicle physics, check roll for animation states. Default roll: most entities have roll=0 (upright, no tilt), cameras/vehicles may have non-zero roll for effects. Angle accumulation: roll may exceed 360 degrees or be negative (accumulated from b3dTurnEntity calls, no automatic wrapping), normalized during matrix calculation but stored value may be large. Position vs rotation: roll doesn't affect position (pure rotation, entity stays in place when roll changes), use b3dEntityX/Y/Z for position queries. Invalid handle: returns 0.0 for non-existent entities (silent fail), 0.0 is valid roll (upright, no tilt), check entity validity separately. Performance: O(1) lookup (hash map find, field access, very fast). Related: b3dEntityPitch returns pitch (X-axis rotation), b3dEntityYaw returns yaw (Y-axis rotation), b3dRotateEntity sets absolute rotation, b3dTurnEntity applies relative rotation, b3dPointEntityAt supports roll control.