Repository navigation
A3D_QuaternionToEuler
imshooter edited this page Oct 17, 2026
·
1 revision
Turn a quaternion, such as one from GetVehicleRotationQuat, into the rotation of an object.
native bool:A3D_QuaternionToEuler(
Float:w,
Float:x,
Float:y,
Float:z,
&Float:rx,
&Float:ry,
&Float:rz
);| Parameter | Description |
|---|---|
Float:w |
Real part of the quaternion. |
Float:x |
Part of the X axis. |
Float:y |
Part of the Y axis. |
Float:z |
Part of the Z axis. |
&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.
The reverse of A3D_EulerToQuaternion. It turns the rotation of a vehicle into the rotation of an object, on every axis, where the facing angle of a vehicle only gives the heading.
Leaves a wreck turned exactly as the vehicle was, on a slope too.
stock LeaveWreck(vehicleid) {
new
Float:x,
Float:y,
Float:z,
Float:w,
Float:qx,
Float:qy,
Float:qz,
Float:rx,
Float:ry,
Float:rz
;
GetVehiclePos(vehicleid, x, y, z);
GetVehicleRotationQuat(vehicleid, w, qx, qy, qz);
A3D_QuaternionToEuler(w, qx, qy, qz, rx, ry, rz);
return CreateObject(3593, x, y, z, rx, ry, rz);
}-
A3D_EulerToQuaternion: Turn the rotation of an object into a quaternion, in the order of
GetVehicleRotationQuat. - A3D_GetVehicleOffsetPosition: Find where a point given relative to a vehicle lies in the world, as the vehicle stands and leans now.
3DAndreas 0.6.3 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions