Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Shooting bullets doesn't work

Discussion in 'Getting Started' started by MRcoderboss, Aug 7, 2019.

  1. MRcoderboss

    MRcoderboss

    Joined:
    Aug 7, 2019
    Posts:
    18
    The problem is that it doesn't fire bullets at the center of the screen.Please help me.
     

    Attached Files:

    • fire.cs
      File size:
      998 bytes
      Views:
      166
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    8,572
    Well what does it do?

    Check for any console errors. Add Debug.Log statements to see what path the code is taking. Such as output the value of playerUI.ammo. For all I know it is set to 0, so pressing the mouse button to fire does nothing.
     
unityunity