Repository navigation
A3D_SetPlanar
imshooter edited this page Oct 17, 2026
·
1 revision
Keep a moving physics object at its height, so it only moves along the ground.
native bool:A3D_SetPlanar(Physic:physicid, bool:planar = true);| Parameter | Description | Default |
|---|---|---|
Physic:physicid |
Physics object to change. | |
bool:planar |
true to keep its height, false to let it move freely again. |
true |
-
truewhen it was changed. -
falsewhenphysicidis not a moving physics object.
A planar object never moves up or down. Gravity and every push along the Z axis are ignored while it is planar, so it slides and rolls on the plane where it was. It still turns freely.
It keeps balls on a table that must never jump, or objects of a game played on a flat floor.
A block for a table game that slides on ice.
stock Physic:CreateSlidingBlock(modelid, Float:x, Float:y, Float:z) {
new Physic:block = A3D_CreateBox(modelid, 0.1, 0.1, 0.04, x, y, z, 0.0, 0.0, 0.0, 0.2);
A3D_SetPlanar(block);
A3D_SetFriction(block, 0.05);
return block;
}- A3D_SetRollingFriction: Slow a moving physics object down by a constant amount, as a ball rolling on cloth.
- A3D_SetGravity: Set how strongly a moving physics object falls.
3DAndreas 0.7.0 · 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