Skip to content

A3D_SetPosition

imshooter edited this page Oct 17, 2026 · 1 revision

Move a physics object to a new place at once.

native bool:A3D_SetPosition(Physic:physicid, Float:x, Float:y, Float:z);

Parameters

Parameter Description
Physic:physicid Physics object to move.
Float:x Position on the X axis.
Float:y Position on the Y axis.
Float:z Position on the Z axis.

Returns

  • true when it was moved.
  • false when physicid is not a physics object.

Remarks

The object jumps to the new place and players see it there at once, without a move in between. Its velocity and spin are kept, so a ball put back on its spot keeps rolling unless A3D_SetVelocity stops it.

A moving object wakes up. A static object or a zone moves without waking what rests on it, so move them only where nothing rests.

Example

Puts a ball back on its spot, still.

stock ResetBall(Physic:ball, Float:x, Float:y, Float:z) {
    A3D_SetPosition(ball, x, y, z);
    A3D_SetVelocity(ball, 0.0, 0.0, 0.0);
}

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