Repository navigation
A3D_GetRotation
imshooter edited this page Oct 17, 2026
·
1 revision
The rotation of a physics object, as an object rotation.
native bool:A3D_GetRotation(Physic:physicid, &Float:rx, &Float:ry, &Float:rz);| Parameter | Description |
|---|---|
Physic:physicid |
Physics object to read. |
&Float:rx |
Rotation on the X axis. |
&Float:ry |
Rotation on the Y axis. |
&Float:rz |
Rotation on the Z axis. |
-
truewhen the rotation was written. -
falsewhenphysicidis not a physics object.
The angles may differ from the ones given to A3D_SetRotation and still describe the same rotation, since several sets of angles turn an object the same way.
Tells whether a crate fell on its side.
stock bool:HasTippedOver(Physic:crate) {
new
Float:rx,
Float:ry,
Float:rz
;
if (!A3D_GetRotation(crate, rx, ry, rz)) {
return false;
}
return floatcos(rx, degrees) * floatcos(ry, degrees) < 0.5;
}- A3D_SetRotation: Turn a physics object to a new rotation at once.
-
A3D_EulerToQuaternion: Turn the rotation of an object into a quaternion, in the order of
GetVehicleRotationQuat.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions