Physics Basic Shape: GetRotation
Get the current rotation of the equipment.
Function
array GetRotation();
Return Value
An array of doubles containing three angle components, in degrees. ([direction, tilt, roll])
Example
function OnSimulationStart()
{
let shape = GetComponentByNameAndType("PhysicsBasicShape1", "Physics Basic Shape");
PrintShapeRotation(shape);
shape.Rotate(30, 30, 30, 15, 15, 15, PrintShapeRotation);
}
function PrintShapeRotation(shape)
{
let angles = shape.GetRotation();
LogDebug(`Direction=${angles[0]} degrees Tilt=${angles[1]} Roll=${angles[2]}`);
}