Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How To Make it Shoot In Right Direction?

Discussion in 'Scripting' started by CunningLobster, Sep 2, 2020.

  1. CunningLobster

    CunningLobster

    Joined:
    Jun 25, 2020
    Posts:
    10
    I make a runner game with simple shooting mechanics and there is a problem I can't solve. All my projectiles go forward towards Z axis even when a gun altitude changed.
    I'm sure it's not a big problem, but I really can't figure it out.
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,769
    CunningLobster likes this.
  3. CunningLobster

    CunningLobster

    Joined:
    Jun 25, 2020
    Posts:
    10
    Thanks, it works! So simple
     
    Last edited: Sep 3, 2020
    Kurt-Dekker likes this.