Repository navigation
A3D_SetGravity
imshooter edited this page Oct 17, 2026
·
1 revision
Set how strongly a moving physics object falls.
native bool:A3D_SetGravity(Physic:physicid, Float:gravity);| Parameter | Description |
|---|---|
Physic:physicid |
Physics object to change. |
Float:gravity |
Gravity in metres per second squared. Starts at 9.81, and 0.0 floats. |
-
truewhen the gravity was set. -
falsewhenphysicidis not a moving physics object.
Every moving object starts at the gravity of the game, 9.81. A gravity of 0.0 makes an object drift as if in space, and a negative one makes it rise like a balloon. The damping still slows it down.
stock Physic:CreateFloatingBall(Float:x, Float:y, Float:z) {
new Physic:ball = A3D_CreateSphere(1598, 0.3, x, y, z, 0.5);
A3D_SetGravity(ball, 0.0);
return ball;
}- A3D_SetAcceleration: Push a moving physics object with a constant acceleration until it is set to zero.
- A3D_SetPlanar: Keep a moving physics object at its height, so it only moves along the ground.
- A3D_PredictTrajectory: Follow something thrown, such as a grenade, and find where it first lands.
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