Physics Basic Shape: OnArrivePosition

Invoked when the physics basic shape arrives at the location specified by GoToPosition.

Event

void xxxxxxxxxxxxxxxxx(sender: object, x: float, y: float, z: float);

Parameters

Name Type Description
sender Object The basic shape object that has arrived at position
x Number The x coordinate of the physics basic shape
y Number The y coordinate of the physics basic shape
z Number The z coordinate of the physics basic shape

Example

function OnSimulationStart()
{
    let shape = GetComponentByNameAndType("PhysicsBasicShape1", "Physics Basic Shape");
    SubscribeToEvent("OnArrivePosition", shape.Name, "Physics Basic Shape", ReportPosition);
    shape.GoToPosition(3, 3, 3, 3, 3, 3);
}

function ReportPosition(shape, x, y, z)
{
    LogDebug(`Physics Basic Shape "${shape.Name}" has arrived at (${x},${y},${z}).`);
}