Skip to content

A3D_GetObjectID

imshooter edited this page Oct 18, 2026 · 2 revisions

The global object that shows a physics object.

native A3D_GetObjectID(Physic:physicid);

Parameters

Parameter Description
Physic:physicid Physics object to read.

Returns

  • The object.
  • INVALID_OBJECT_ID when it shows none, or physicid is not a physics object.

Remarks

Only a moving object created with a model has a global object. Static objects, zones, objects created with the model -1 and objects given to a streamer object return INVALID_OBJECT_ID.

The component moves the object. Changing its material, its text or its camera collision is safe, moving it is not, since the next update puts it back.

Example

Keeps the camera from bumping into balls.

stock Physic:CreateBall(Float:x, Float:y, Float:z) {
    new Physic:ball = A3D_CreateSphere(1598, 0.3, x, y, z, 0.5);

    SetObjectNoCameraCol(A3D_GetObjectID(ball));

    return ball;
}

Related

  • A3D_AttachDynamicObject: Show a moving physics object with a streamer object instead of a global object.
  • A3D_CreateObject: Create a moving physics object shaped like the collision of a model, or as models.json describes the model.

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