Search Unity

How do i make main player's weapon shoot at the direction of the click? (mobile)

Discussion in '2D' started by BL4CK0UT19, Sep 12, 2019.

  1. BL4CK0UT19

    BL4CK0UT19

    Joined:
    Aug 21, 2019
    Posts:
    21
    Hi!
    So,i'm making a 2D shooting game and i want the player to shoot by clicking somewhere on the screen,and the weapon will rotate to that direction and shoot.
    And i have very little idea on how to do that.
    Simple as that; The player click anywhere on the screen,the weapon rotate to that position and shoot.
    Can someone help?
    Also,sorry for my english!
     
  2. Adien22

    Adien22

    Joined:
    Aug 19, 2019
    Posts:
    44


    this is a bit old, but I think it should still work today