Skip to content

A3D_GetSpeed

imshooter edited this page Oct 17, 2026 · 1 revision

The speed of a moving physics object.

native Float:A3D_GetSpeed(Physic:physicid);

Parameters

Parameter Description
Physic:physicid Physics object to read.

Returns

  • The speed in metres per second.
  • 0.0 when physicid is not a moving physics object.

Remarks

The length of the velocity, on every axis. The speed of an impact is given to A3D_OnCollided instead.

Example

stock bool:IsShotHard(Physic:ball) {
    return A3D_GetSpeed(ball) > 15.0;
}

Related

  • A3D_GetVelocity: The velocity of a moving physics object.
  • A3D_GetMoveAngle: The direction a moving physics object travels on the ground, as a facing angle.
  • A3D_OnCollided: A moving physics object hit something faster than its collision speed.

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