public void IndicateRobotReachability(bool active) { if (active) { Vector3 arm_position_in_world = world_anchor.transform.InverseTransformPoint(robotArm.transform.position); //Debug.Log(arm_position_in_world); if (RobotHelper.IsArmAboveTable(arm_position_in_world)) { robotArm.GetComponent <PR2GripperController>().MaterialColorToGreen(); } else { robotArm.GetComponent <PR2GripperController>().MaterialColorToRed(); } } else { robotArm.GetComponent <PR2GripperController>().MaterialColorToDefault(); } }