Repository navigation
A3D_CreateStaticBox
imshooter edited this page Oct 17, 2026
·
1 revision
Create an invisible box that never moves, such as a wall or a floor.
native Physic:A3D_CreateStaticBox(
Float:sizeX,
Float:sizeY,
Float:sizeZ,
Float:x,
Float:y,
Float:z,
Float:rx = 0.0,
Float:ry = 0.0,
Float:rz = 0.0,
worldid = -1
);| Parameter | Description | Default |
|---|---|---|
Float:sizeX |
Size on the X axis. | |
Float:sizeY |
Size on the Y axis. | |
Float:sizeZ |
Size on the Z axis. | |
Float:x |
Position on the X axis. | |
Float:y |
Position on the Y axis. | |
Float:z |
Position on the Z axis. | |
Float:rx |
Rotation on the X axis. | 0.0 |
Float:ry |
Rotation on the Y axis. | 0.0 |
Float:rz |
Rotation on the Z axis. | 0.0 |
worldid |
Virtual world it collides in, or -1 for every world. |
-1 |
- The physics object.
-
INVALID_PHYSIC_IDwhen a size is not positive, or the world is full.
An invisible box for walls, floors and the tops of tables. It stops physics objects and queries find it as A3D_HIT_STATIC. Players and vehicles walk and drive through it, since the game does not know it.
Its bounce starts at 1.0, so it leaves the bounce of what hits it unchanged. A bounce of 0.0 stops every bounce on it, which suits the cloth of a table.
Lays the cloth of a pool table that stops the balls from bouncing.
static Physic:gCloth;
public OnGameModeInit() {
gCloth = A3D_CreateStaticBox(2.2, 1.2, 0.1, 1700.0, -2500.0, 13.4);
A3D_SetBounce(gCloth, 0.0);
A3D_SetFriction(gCloth, 0.2);
return 1;
}- A3D_CreateStaticCylinder: Create an invisible upright cylinder that never moves, such as a pillar.
- A3D_CreateArea: Create four walls around a rectangle on the ground.
- A3D_CreateStaticObject: Create a physics object that never moves, shaped like the collision of a model.
- A3D_CreateZone: Create a box shaped zone that reports moving physics objects entering and leaving it.
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