Skip to content

A3D_GetMoveAngle

imshooter edited this page Oct 17, 2026 · 1 revision

The direction a moving physics object travels on the ground, as a facing angle.

native Float:A3D_GetMoveAngle(Physic:physicid);

Parameters

Parameter Description
Physic:physicid Physics object to read.

Returns

  • The angle in degrees, 0.0 to the north and growing to the west.
  • 0.0 when physicid is not a moving physics object.

Remarks

The angle follows the convention of GetPlayerFacingAngle: 0.0 to the north, 90.0 to the west, 180.0 to the south and 270.0 to the east. The vertical speed is left out. An object that moves straight up or down, or not at all, gives 0.0.

Example

Turns a goalkeeper actor to face where the ball comes from.

stock FaceBall(actorid, Physic:ball) {
    if (A3D_GetSpeed(ball) < 1.0) {
        return;
    }

    SetActorFacingAngle(actorid, A3D_GetMoveAngle(ball) + 180.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