Search Unity

Drag to Aim , Release To Fire

Discussion in 'Scripting' started by RajRajRaj, Oct 17, 2015.

  1. RajRajRaj

    RajRajRaj

    Joined:
    Aug 31, 2015
    Posts:
    42
    Hye there i m making a simple Shooting Game but its not like

    FPS(First Person) shooting game..

    it is simple 2d (Mobile game) where if we touch anywhere on

    screen player aim at that point and a Aiming arrow is also

    appear and when we release it shoots the bullet....

    i know I can make that with the help of OnPointerDown ,

    OnDrag , OnPointerUp function but because i m beginer i cant

    code that properly i tried but failed every time....
    and one more thing bullet has rigidbody so we only have to

    addfore in the direction of pointer released plz helpme

    out.....

    if there is any Video Tutorial availabe similar to my

    Problem then plz send me link...

    i will be thankfull n appricate u in advance for my help :)
    u can Better understand with photos that i attached what i m

    trying to do....
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      83.2 KB
      Views:
      654
    • 2.png
      2.png
      File size:
      183.8 KB
      Views:
      682