Repository navigation
A3D_SetFriction
imshooter edited this page Oct 17, 2026
·
1 revision
Set how much a physics object grips what it touches.
native bool:A3D_SetFriction(Physic:physicid, Float:friction);| Parameter | Description |
|---|---|
Physic:physicid |
Physics object to change. |
Float:friction |
Friction, 0.0 for ice and about 1.0 for rubber. Starts at 0.5. |
-
truewhen the friction was set. -
falsewhenphysicidis not a physics object.
The friction of a contact is the square root of the product of the frictions of both bodies. The map, players, vehicles and actors have 0.2, so an object of 0.5 slides on the map with about 0.32. An object of 0.0 slides on everything as on ice.
It works on every physics object, static ones included, which makes slippery floors and ramps.
An icy ramp that crates slide down.
public OnGameModeInit() {
new Physic:ramp = A3D_CreateStaticBox(4.0, 10.0, 0.3, 1700.0, -2470.0, 14.5, 20.0, 0.0, 0.0);
A3D_SetFriction(ramp, 0.0);
return 1;
}- A3D_SetBounce: Set how much a physics object bounces.
- A3D_SetRollingFriction: Slow a moving physics object down by a constant amount, as a ball rolling on cloth.
- A3D_SetDamping: Set how fast a moving physics object loses speed and spin on its own.
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