Skip to content

Class: phcondition_callonstep

Physics condition that becomes true on or after a selected physics step/time.

Source

src/xrPhysics/PHSimpleCallsScript.cpp, phcondition_callonstep binding.

Custom Constructor

phcondition_callonstep

Remarks

Use with physics_world.add_call() to schedule a physics action. Step and time interval setters compute the target step from the current physics world state.

Extends

Extended by

Constructors

Constructor

ts
new phcondition_callonstep(): phcondition_callonstep;

Create a physics step condition.

Returns

phcondition_callonstep

Overrides

CPHCondition.constructor

Methods

set_global_time_ms()

ts
set_global_time_ms(time: number): void;

Set the absolute game time in milliseconds that must be reached.

Parameters

ParameterTypeDescription
timenumberAbsolute global time in milliseconds.

Returns

void


set_global_time_s()

ts
set_global_time_s(time: number): void;

Set the absolute game time in seconds that must be reached.

Parameters

ParameterTypeDescription
timenumberAbsolute global time in seconds.

Returns

void


set_step()

ts
set_step(step: number): void;

Set the absolute physics step that must be reached.

Parameters

ParameterTypeDescription
stepnumberAbsolute physics step number.

Returns

void


set_steps_interval()

ts
set_steps_interval(steps: number): void;

Set the condition to become true after a number of physics steps.

Parameters

ParameterTypeDescription
stepsnumberStep count from the current physics world step.

Returns

void


set_time_interval_ms()

ts
set_time_interval_ms(time: number): void;

Set the condition to become true after a millisecond interval.

Parameters

ParameterTypeDescription
timenumberInterval in milliseconds.

Returns

void


set_time_interval_s()

ts
set_time_interval_s(time: number): void;

Set the condition to become true after a second interval.

Parameters

ParameterTypeDescription
timenumberInterval in seconds.

Returns

void