Skip to content

A3D_CreateStaticCylinder

imshooter edited this page Oct 17, 2026 · 1 revision

Create an invisible upright cylinder that never moves, such as a pillar.

native Physic:A3D_CreateStaticCylinder(
    Float:radius,
    Float:height,
    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:radius Radius of the cylinder.
Float:height Height of the cylinder.
Float:x Position of its centre on the X axis.
Float:y Position of its centre on the Y axis.
Float:z Position of its centre 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 the radius or the height is not positive, or the world is full.

Remarks

The cylinder stands along its Z axis before the rotation, with the position at the middle of its height. A rotation of 90.0 on the X or the Y axis lays it down.

A round pillar makes balls glance off at the angle they hit, where a box would send them back square.

Example

Places the pole of a basketball hoop.

public OnGameModeInit() {
    A3D_CreateStaticCylinder(0.1, 3.0, 1700.0, -2500.0, 14.0);

    return 1;
}

Related

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