Basicshape: GetRotation
This gives the current rotation of the equipment
Function
array GetRotation();
Parameters
None
Return Value
An array of 3 double values [dir,tilt,roll].
Example
function OnSimulationStart()
{
let shape = GetComponentByNameAndType("BasicShape1", "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]}`);
}