Physics Basic Shape: GetPosition
Get the current position of the equipment.
Function
array GetPosition();
Return Value
An array of doubles containing each component [x, y, z].
Example
let shape = GetComponentByNameAndType("PhysicsBasicShape1", "Physics Basic Shape");
function OnSimulationStart()
{
Position();
}
function Position()
{
// start animation
shape.GoToPosition(7, 0, 0, 1, 0, 1, Noop, [1000, 800, 600, 400, 200]);
}
function Noop(sender, x, y, z)
{
// get the current position and log it
let pos = shape.GetPosition();
LogDebug("X: " + pos[0] + " Y: " + pos[1] + " Z: " + pos[2]);
}