Hi guys.I am devoloping a game for ios and android in 2D platform and i want to make character’s gun target whereever i touch at the screen and shoot at the same time.I want to make the gun follow my finger in the same direction by holding my finger on the screen.How can i program that?
You should start by investigating the functionality for getting touch input from the Unity documentation. Here’s a good place to start:
Try writing the code yourself and ask specific questions if you encounter difficulties.
You should actually start with proper thread title like “How do I do …” instead of just “How?”. Keep that in mind in the future.