Hi,
As the title suggests, I am making a side-scrolling shooter game. The player aims with their mouse. I want the gun of the player to look as if it’s aiming where the mouse is aiming.
My current set-up is 2D planes with textures on them, and an orthographic camera. This successfully simulates the 2D effect I want to get.
I have tried to do:
transform.Lookat(Input.mousePosition) but this does not aim the gun at the mouse position (possibly because it uses a 3D Vector?).
Can anybody provide me with a solution to this problem?
Thanks,
Rich B