Transform.LookAt - Look through Y-Axis?

Hello all,

I’m trying to use transform.Lookat to rotate a sprite to look toward my mouse position.

However rather than pointing to my mouse position via the Y axis, it points my sprite via it’s Z axis instead.

This obviously causes the sprite lay flat and rotate. Meaning it cannot be seen correctly by the camera.

Anyone have a fix?

Thanks.

The Z axis is Unity’s forward axis, so all LookAt calls orient the object that way.

Here’s a similar question, check out Duck’s answer.