2D rotation through z??

Hi there

I’m creating a 2d game and have made all the correct setup (or at least I think I have). Using orthographic camera etc…

I am transforming my sprite on click, but having to do it through Z. Can someone explain to me why Z and not X.

transform.Rotate(0,0,-90)

edit: sorry forgot yo mention i am using ex2d not sure if that’s relevant though

Well in unity Z is forward axis. Thats it. It’s just the way they inplemented coordinate system.

Z - forward

Y - up

X - right (or left? not sure)