Unity2D Top-Down Simple Shooting Script C#

Hi guys,

I’ve been trying several times on making a very simplistic shooting script for my top-down game. I’m still quite not the best at c# and still somewhat new to it.

Previously I’ve been trying to have my sprite character’s front look to wherever the mouse is pointed and then shoot using the right mouse button.

Would really be helpful if someone can help me out, thank you so much guys.

You have declared mousePos at the top of update and put Input.mouseposition but in the next line you change it to screentoworldpoint. Create a new variable to take your screentoworldpoint. Try that!