How To Make 2D Arrow or Bomb Projectiles in Unity (Tutorial)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2024
  • In this tutorial, you'll learn how to create arrow projectiles or any trajectories using Unity and C#! By the end of the video, you'll be able to create towers or even armies that automatically shoot arrows/projectiles to its enemy.
    Interested in developing AR applications? Try Unity MARS!
    Unity MARS is a new, specialized authoring environment that includes tools and UI that give augmented reality developers the power to prototype, test, and deliver intelligent AR experiences.
    Learn more about Unity MARS:
    ► weeklyhow.com/...
    ||====================================================||
    Not subscribe yet? Subscribe now for more videos:
    ► www.youtube.co...
    More about this tutorial here:
    ► weeklyhow.com/...
    Assets Used:
    Sunny Land:
    ► bit.ly/33GnZeG
    Pixel Art Platformer - Village Props:
    ► bit.ly/3hxOJ5H
    Official Website:
    ► weeklyhow.com/
    Support us on Patreon:
    ► / weeklyhow
    Follow us on our Social Media:
    Facebook ► / weeklyhow
    Twitter ► / howweekly
    Instagram ► / weeklyhow
    Pinterest ► / weeklyhow
    #Unity3d #UnityDevelopment #GameDev #GameDevelopment #UnityTutorials #WeeklyHow

ความคิดเห็น • 22

  • @hardworkerstudio
    @hardworkerstudio 2 หลายเดือนก่อน

    This VDO super makesense!

  • @beppecode7063
    @beppecode7063 10 หลายเดือนก่อน

    Very Good! Thanks!

  • @KOLHO
    @KOLHO 11 หลายเดือนก่อน

    thanks man, it helped a lot.

  • @muhammedfethicalskan5352
    @muhammedfethicalskan5352 3 ปีที่แล้ว

    you saved my life,thank you sooooo much bro!

  • @Tutterzoid
    @Tutterzoid 2 ปีที่แล้ว

    Thanks for the link to those assets that you used :)

  • @Tutterzoid
    @Tutterzoid 2 ปีที่แล้ว

    Thanks for that concise view with that Awesome code :)
    Great idea to rotate a sprite on the Z-axis ..
    First time I see that in a Tutorial .. :)

  • @JoeHobbiesfun
    @JoeHobbiesfun 2 ปีที่แล้ว

    Thanks for the tut, How can I shoot from right to left?

  • @god_of_everything9644
    @god_of_everything9644 2 ปีที่แล้ว +1

    It shoots too fast when Target Just Above Player

  • @hadyhesham1203
    @hadyhesham1203 ปีที่แล้ว

    Is there a way to change the peak Y position it can reach ? I tried tweaking the baseY , and the height variables with no success :(

  • @RetroRedDog
    @RetroRedDog 2 ปีที่แล้ว

    Hi, it only fires once, is there a way to have it fire more?

  • @Tutterzoid
    @Tutterzoid 2 ปีที่แล้ว

    Add the work "Trajectory" or "Flight path" into the title and I am sure you will get much more views :)

  • @hyld_yt4152
    @hyld_yt4152 ปีที่แล้ว +1

    Why does it only shoot one time when i click play???? help pls txt.

    • @aleksandraaleksandra7934
      @aleksandraaleksandra7934 ปีที่แล้ว

      I have the same problem bro. Did you solve it?
      I gave: if(Input.GetButtonDown("Fire1") and then the whole Update sequence as in the tutorial but it didn't help

    • @hyld_yt4152
      @hyld_yt4152 ปีที่แล้ว

      @@aleksandraaleksandra7934 no

    • @Lps-bx7ck
      @Lps-bx7ck ปีที่แล้ว

      Make the input instantiate the bomb back into the cannon, or better yet, when the bomb hits the frog hide it away and when input is pressed just move it back to the cannon (this makes it so you can only fire one at a time)

  • @MrHarleyhn
    @MrHarleyhn 2 ปีที่แล้ว

    Is there a way to make this work with the enemy being a moving target? Tried to make this work but did not go very well.

  • @Sarv9208
    @Sarv9208 2 ปีที่แล้ว

    Tengo un proyecto en 2D, mi jugador tiene un Rigidbody con:
    Mass o masa 0.01, Gravedad 1, rotación z congelada.
    Al configurar el salto verifico que este tocando el suelo y pues salto, al salto le programe que al rigidbody del jugador se le aplique una fuerza AddForce con vector 2 0, fuerza del salto , esta fuerza es de 4f, funciona perfecto, salta unos "metros" y vuelve a caer.
    ahora intento arrojar una bomba en diagonal (he hecho pruebas solo vertical en y), tiene un rigidboy similar al jugador (copiado incluso) también verifico si es un objeto lanzable, si esta cayendo etc, el problema es que siempre que intento arrojarla no me da, si la fuerza al igual que el jugador simplemente cae y en caso de ser lanzado, literalmente no vuelve a caer.

  • @guilherme95069
    @guilherme95069 2 ปีที่แล้ว

    where can i copy and paste the code can someone post it here

  • @b1rfp_889
    @b1rfp_889 3 ปีที่แล้ว

    IT JUST GIVES ME AN ERROR SAYING 'error ; expected'

    • @WeeklyHow
      @WeeklyHow  3 ปีที่แล้ว +1

      Hi Daniel, thanks for watching! I suggest checking your code, you might be missing a semi-colon. Your debug window should give you which line of code is missing a semi-colon.

  • @maxshooter21
    @maxshooter21 3 ปีที่แล้ว

    Thanks a lot. How can I download the scripts?