Repository navigation
A3D_SetAcceleration
imshooter edited this page Oct 17, 2026
·
1 revision
Push a moving physics object with a constant acceleration until it is set to zero.
native bool:A3D_SetAcceleration(Physic:physicid, Float:ax, Float:ay, Float:az);| Parameter | Description |
|---|---|
Physic:physicid |
Physics object to push. |
Float:ax |
Acceleration on the X axis, in metres per second squared. |
Float:ay |
Acceleration on the Y axis. |
Float:az |
Acceleration on the Z axis. |
-
truewhen the acceleration was set. -
falsewhenphysicidis not a moving physics object.
The acceleration is applied on every step, on top of the gravity, until it is set to 0.0, 0.0, 0.0. It acts as a force of the mass times the acceleration, so every object reaches the same acceleration whatever its mass. An accelerated object never comes to rest.
It suits wind, a conveyor belt or a rocket.
Blows a balloon away to the east.
stock Physic:LaunchBalloon(Float:x, Float:y, Float:z) {
new Physic:balloon = A3D_CreateSphere(-1, 0.4, x, y, z, 0.1);
A3D_SetGravity(balloon, -0.5);
A3D_SetAcceleration(balloon, 1.5, 0.0, 0.0);
return balloon;
}- A3D_ApplyImpulse: Push a moving physics object through its centre of mass.
- A3D_SetGravity: Set how strongly a moving physics object falls.
- A3D_SetVelocity: Set the velocity of a moving physics object and wake it up.
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