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
This VDO super makesense!
Very Good! Thanks!
thanks man, it helped a lot.
you saved my life,thank you sooooo much bro!
Thanks for the link to those assets that you used :)
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 .. :)
Thanks for the tut, How can I shoot from right to left?
It shoots too fast when Target Just Above Player
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 :(
Hi, it only fires once, is there a way to have it fire more?
Add the work "Trajectory" or "Flight path" into the title and I am sure you will get much more views :)
Why does it only shoot one time when i click play???? help pls txt.
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
@@aleksandraaleksandra7934 no
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)
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.
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.
where can i copy and paste the code can someone post it here
IT JUST GIVES ME AN ERROR SAYING 'error ; expected'
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.
Thanks a lot. How can I download the scripts?