how to set rotation axis in unity code example
Example: rotation around own axis in unity
transform.RotateAround(transform.position, transform.up, Time.deltaTime * 90f);
transform.RotateAround(transform.position, transform.up, Time.deltaTime * 90f);