Returns entity pitch rotation in degrees (X-axis rotation, 0.0 if invalid).
Takes entity (entity handle).
Returns pitch angle as Double (entity.rotation.x in degrees, 0.0 if entity doesn't exist).
3D Graphics
Parameters & Returns
Parameters
entityInt
Returns
Double
Quick Summary
Returns entity pitch rotation in degrees (X-axis rotation, 0.0 if invalid).
Takes entity (entity handle).
Returns pitch angle as Double (entity.rotation.x in degrees, 0.0 if entity doesn't exist).
Technical Exegesis...
Returns entity pitch rotation in degrees (X-axis rotation, 0.0 if invalid). Takes entity (entity handle). Returns pitch angle as Double (entity.rotation.x in degrees, 0.0 if entity doesn't exist). Validates entity exists, returns rotation.x directly (pitch component of Euler angles), returns 0.0 if invalid handle. Query function for entity up/down rotation.
This function retrieves entity pitch angle.
Returns entity pitch rotation in degrees (X-axis rotation, 0.0 if invalid). Takes entity (entity handle). Returns pitch angle as Double (entity.rotation.x in degrees, 0.0 if entity doesn't exist). Validates entity exists, returns rotation.x directly (pitch component of Euler angles), returns 0.0 if invalid handle. Query function for entity up/down rotation.
This function retrieves entity pitch angle. Pitch definition: rotation around X-axis (look up/down), positive pitch = looking up, negative pitch = looking down, measured in degrees. Return value: returns entity.rotation.x (stored as degrees, not radians), float converted to double, 0.0 if entity handle invalid. Euler angles: pitch is X component of pitch/yaw/roll rotation (entity.rotation = XMFLOAT3(pitch, yaw, roll)), combined with yaw/roll to form complete orientation. Use cases: (1) Orientation queries (get current facing direction for AI, aiming), (2) Camera control (query camera look angle), (3) Animation (check entity tilt for procedural animation), (4) Debugging (log rotation state), (5) Constraints (clamp pitch to prevent over-rotation). Common pattern: pitch = b3dEntityPitch(entity), if pitch > maxPitch: clamp pitch, or targetPitch = b3dEntityPitch(camera) for smooth camera transitions. Typical usage: query pitch for look direction, combine with yaw/roll for full orientation, check pitch for animation states (looking up/down). Angle accumulation: pitch 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: pitch doesn't affect position (pure rotation, entity stays in place when pitch changes), use b3dEntityX/Y/Z for position queries. Invalid handle: returns 0.0 for non-existent entities (silent fail), 0.0 is valid pitch (looking straight ahead horizontally), check entity validity separately. Performance: O(1) lookup (hash map find, field access, very fast). Related: b3dEntityYaw returns yaw (Y-axis rotation), b3dEntityRoll returns roll (Z-axis rotation), b3dRotateEntity sets absolute rotation, b3dTurnEntity applies relative rotation.