Skip to content

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
);

Parameters

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

Returns

  • The physics object.
  • INVALID_PHYSIC_ID when a size is not positive, or the world is full.

Remarks

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.

Example

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;
}

Related

  • 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.

Home

Guides

Reference

Functions

Creating objects
Motion
Placement
Behaviour
Display and data
Rays
Shapes
Players, vehicles and actors
Map probes
Screen
Map objects
Water
Models and surfaces
Rotations and offsets
Vehicles
Routes
Route display
Walking
Callbacks

Clone this wiki locally