Get angle of rotation around local axis

Edit : Question was too long.

Ok so I have a world rotation, or say, a Transform. How can I get the rotation around its local X axis (transform.right) and local Y axis (transform.up)?


It sounds like you are looking for the object’s local Euler angles:

float localRotationX = transform.localRotation.eulerAngles.x;
float localRotationY = transform.localRotation.eulerAngles.y;