Repository navigation
A3D_SetBounce
imshooter edited this page Oct 17, 2026
·
1 revision
Set how much a physics object bounces.
Two objects that touch bounce by the product of their bounces, and the map counts as 1.0. A static object with no bounce, such as the cloth of a table, stops every bounce on it.
native bool:A3D_SetBounce(Physic:physicid, Float:bounce);| Parameter | Description |
|---|---|
Physic:physicid |
Physics object to change. |
Float:bounce |
Restitution, 0.0 for no bounce and 1.0 for a perfect one. Starts at 0.3 for moving objects and 1.0 for static objects and zones. |
-
truewhen the bounce was set. -
falsewhenphysicidis not a physics object.
The bounce of a contact is the product of the bounces of both bodies. The map, players, vehicles and actors count as 1.0 and leave the bounce of the object unchanged. A static object with a bounce of 0.0 stops every bounce on it.
Impacts slower than 3dandreas.bounce_speed, 0.1 metres per second by default, never bounce, so resting objects do not jitter. See Configuration.
A ball that bounces well everywhere but on a soft mat.
public OnGameModeInit() {
new
Physic:ball = A3D_CreateSphere(1598, 0.3, 1700.0, -2500.0, 20.0, 0.5),
Physic:mat = A3D_CreateStaticBox(3.0, 3.0, 0.1, 1700.0, -2500.0, 12.6)
;
A3D_SetBounce(ball, 0.9);
A3D_SetBounce(mat, 0.0);
return 1;
}- A3D_SetFriction: Set how much a physics object grips what it touches.
- A3D_SetDamping: Set how fast a moving physics object loses speed and spin on its own.
- A3D_GetModelPhysics: Find how the game moves a model that can be knocked over, such as a bin or a crate, in the values the natives of this include take.
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