Arma 3 Scripting

Command in PhysX

isAwake

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns resting state of a PhysX (EPE) object. Some EPE objects are deliberately put to sleep by the engine to save resources. This command returns true when object is simulating and false when it is put to sleep. With units of type Man the behaviour is slightly different. As units never get put to sleep, the command outputs ragdoll state of a unit instead. There are 6 states for the output of the command:

Syntax

isAwake object

Parameters:

Returns: Boolean - see description

Examples

Example 1

private _isAwake = isAwake _object;

Example 2

Arma 3 v2.10 Here is a simple formula to return ragdoll state of a unit:

private _unitIsInRagdoll = alive _unit != isAwake _unit;

See also

awake · addTorque · addForce · vectorModelToWorld · vectorModelToWorldVisual · selectionPosition