Repository navigation
A3D_GetVelocity
imshooter edited this page Oct 17, 2026
·
1 revision
The velocity of a moving physics object.
native bool:A3D_GetVelocity(Physic:physicid, &Float:vx, &Float:vy, &Float:vz);| Parameter | Description |
|---|---|
Physic:physicid |
Physics object to read. |
&Float:vx |
Velocity on the X axis, in metres per second. |
&Float:vy |
Velocity on the Y axis, in metres per second. |
&Float:vz |
Velocity on the Z axis, in metres per second. |
-
truewhen the velocity was written. -
falsewhenphysicidis not a moving physics object.
The velocity is that of the centre of mass. An object at rest gives zeros.
stock bool:IsFalling(Physic:physicid) {
new
Float:vx,
Float:vy,
Float:vz
;
if (!A3D_GetVelocity(physicid, vx, vy, vz)) {
return false;
}
return vz < -1.0;
}- A3D_SetVelocity: Set the velocity of a moving physics object and wake it up.
- A3D_GetSpeed: The speed of a moving physics object.
- A3D_GetMoveAngle: The direction a moving physics object travels on the ground, as a facing angle.
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