The rotation as Euler angles in degrees relative to the parent transform's rotation.
// Print the rotation around the parent's X Axis print (transform.localEulerAngles.x); // Print the rotation around the parent's Y Axis print (transform.localEulerAngles.y); // Print the rotation around the parent's Z Axis print (transform.localEulerAngles.z);
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Example() { print(transform.localEulerAngles.x); print(transform.localEulerAngles.y); print(transform.localEulerAngles.z); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Example() as void: print(transform.localEulerAngles.x) print(transform.localEulerAngles.y) print(transform.localEulerAngles.z)