Fire PROJECTILES in UNITY

Fire PROJECTILES in UNITY

BMo

4 года назад

27,498 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@BMoDev
@BMoDev - 06.11.2019 17:07

*When I'm explaining common patterns found within OnTriggerEnter2D, the code should look like
if (collision.gameObject.tag == "Enemy")
or
var enemyComponent = collision.gameObject.GetComponent<Enemy/EnemyHealth>()


Sorry :)

Ответить
@tienly614
@tienly614 - 27.09.2023 04:32

Nice bro❤

Ответить
@optikuszgamingchannel3728
@optikuszgamingchannel3728 - 29.03.2023 18:28

ty this video. can you create a video, how can shoot in the air (while we jumping) or in running?

Ответить
@Lilyvex
@Lilyvex - 29.01.2023 04:17

Great tutorial! For some reason the projectile only moves right, regardless of which way the player is facing. Would love some pointers to this problem!

Ответить
@BigGucc
@BigGucc - 15.12.2022 09:07

Great stuff

Ответить
@decksengchia9659
@decksengchia9659 - 24.10.2022 23:22

I got some problem when i face left side i cant lauch my fireball . It just stay on the ground why?

Ответить
@anuragsaini8689
@anuragsaini8689 - 03.09.2022 19:37

Thanks for such a nice tutorial. Keep making this type of tutorials to help the beginners like me😄

Ответить
@mr.pratik3494
@mr.pratik3494 - 02.06.2022 21:07

whats inside fireball prefab

Ответить
@9seater
@9seater - 27.04.2022 23:27

how would I make this script work the input system manager?

Ответить
@junhyeokjeon815
@junhyeokjeon815 - 06.04.2022 20:27

wtf jumpScare

Ответить
@musicmakespeace
@musicmakespeace - 26.03.2022 11:22

dude what's with the ending man? srsly lame dude. ty for the tutorial btw

Ответить
@mistycomet7501
@mistycomet7501 - 22.02.2022 09:57

hi gr8 video btw, but quick question whenever I left click on my mouse the fireball is spawned however it doesnt move but the one that has been placed before hand does move do u hv a solution?

Ответить
@chairetgaming8067
@chairetgaming8067 - 18.02.2022 19:37

hello,,, nice explanation. but i have trouble on my fire position. it doesnt rotate with player facing. :(

Ответить
@yavuzselimcagan5233
@yavuzselimcagan5233 - 11.02.2022 14:39

I got scared of that giant snowman what a noise.

Ответить
@NightDay1
@NightDay1 - 15.01.2022 18:44

howwwwwwwwwww to add gameobject without add it in scene ????????????????????????!

Ответить
@easyminecrafttutorial809
@easyminecrafttutorial809 - 02.11.2021 05:38

can i copy the code pls help me i dont know how to code

Ответить
@alexdonchev1491
@alexdonchev1491 - 11.10.2021 10:41

:D liked the ending .

Ответить
@itzjackthedog09
@itzjackthedog09 - 18.08.2021 21:52

i cant see what comes after initialize

Ответить
@jovillegas2983
@jovillegas2983 - 05.08.2021 02:54

Hello! I need help. In the projectile script, I set the collission tag to be equal to enemy. This is my code:

void OnTriggerEnter2D (Collider2D col)
{
if (col.tag == "Enemy")
{
Instantiate(ImpactEffect, transform.position, Quaternion.identity);
Destroy(GameObject.FindWithTag("Enemy"));
Destroy(this.gameObject);
Destroy(ImpactEffect.gameObject);
}

I wanted the enemy, the projectile and the impacteffect to be destroyed so i put the code above. It worked for the first few enemies but I tried it on other enemies it only destroyed the projectile but not the enemy. I am only using one enemy and the enemy is in a form of a prefab. Is there a way to fix this? Is there a way for the projectile to hit the target and that target to be destroyed and not some random game object tagged enemy? help plss huhu. Thank you! :)

Ответить
@hieupham3587
@hieupham3587 - 25.04.2021 17:02

Hello everybody, I guess someone will get trouble at impactEffect when it not disappear.
So I have an easy solution to resolve: Select your impactEffect prefab and create a script then call Awake and destroy game object. (exp: Destroy(gameObject, 0.7f);)

Thanks for the author of this video !!

Ответить
@madcrow1592
@madcrow1592 - 19.03.2021 11:55

Asset 'Player': Transition 'AnyState -> idle' in state 'AnyState' doesn't have an Exit Time or any condition, transition will be ignored

Ответить
@user-mk8yh8re4w
@user-mk8yh8re4w - 04.03.2021 16:01

Wow, thank you!!!!

Ответить
@upstart_art6558
@upstart_art6558 - 23.12.2020 15:41

plz help me i getting a error while when I enter the play mode and i release one fireball it destroys OK as asully,but when I release my fireball again its showing error that(gameobject is destroyed you cant release again)

Ответить
@WOLF-ty2se
@WOLF-ty2se - 17.11.2020 14:54

Plz make a video On Gun flash and then fire bullet

Ответить
@twctong253
@twctong253 - 02.11.2020 07:38

Your tutorials are amazing. Thank you so much.

Ответить
@varunsuresh22
@varunsuresh22 - 25.10.2020 21:34

T h a t w a s E n t e r t a i n i n g.. Also learned stuff.. So thanks!

Ответить
@lordcatington8188
@lordcatington8188 - 20.10.2020 11:16

Great! Made it work in an endless runner with a cooldown system

Ответить
@FlamingleGamesINC
@FlamingleGamesINC - 17.10.2020 02:46

Great video! Is there anyway to have it shoot to both the left and right. I really do not know how to do this on my own so if you can explain it in very specific detail that would be great.

Ответить
@TraceguyRune
@TraceguyRune - 05.10.2020 02:30

the impact effect doesn't delete. It keeps looping

Ответить
@mr.shrimpy7311
@mr.shrimpy7311 - 14.08.2020 02:31

When i have rigidbody2d on projectile it just falls when shooting, other than that it was awsome

Ответить
@phen-themoogle7651
@phen-themoogle7651 - 22.07.2020 05:17

I subscribed cuz the boss snowman looks too powerful and I'm low on fire xD
Really epic content!!!! What software did you use to design the ninja character and snowmen etc?

Ответить
@mailmike933m
@mailmike933m - 10.07.2020 17:15

Can u make a tutorial on how to make your snowman fire projectiles towards the player?

Ответить
@phantastik3389
@phantastik3389 - 14.05.2020 05:01

Im having trouble. My Impact effect is spawing instead of my projectile

Ответить
@tombusckull
@tombusckull - 30.04.2020 06:39

My projectiles just dont show up when i shoot left, they show up in my scene mode but when u look through the actualy game mode they dont even appear

Ответить
@swiftycuber3394
@swiftycuber3394 - 30.04.2020 02:49

AWESOME Video! Thanks a lot man. I love the humor as well, it's a bit refreshing after watching so many other monotone voices in tutorials.

Ответить
@mylegs2056
@mylegs2056 - 17.04.2020 07:43

Hey great video but is there anyway to destroy the impactEffect gameObject after it plays through the animation once?


Edit: I found a solution using a timed Destroy in another script, but if you know a way to do it inside of the collision trigger that would be helpful.

Ответить
@munchie8819
@munchie8819 - 03.04.2020 18:58

that ending have me a heart attack, also wondering why it works only facing right and it doesnt shoot when the player is facing left?

Ответить
@Rhino123freak
@Rhino123freak - 02.04.2020 21:09

I'm just a minute in the video and I can definitely tell you need more subscribers. Keep it up man!

Ответить
@bsdev6894
@bsdev6894 - 20.01.2020 07:06

Need help, when ever i shoot to the left it just keeps firing at the right..

Ответить
@amandamolinari5233
@amandamolinari5233 - 13.12.2019 22:10

Great tutorial!! I would like to see this as a playable game! Winter ninja's vs evil snowmen :)

Ответить
@Lokithh
@Lokithh - 20.11.2019 07:16

cool fireball effect. how would you take damage instead of destroying the gameobject it hits?

Ответить
@myturtlegames
@myturtlegames - 15.11.2019 03:06

Thanks for the videos

Ответить
@eileeng2492
@eileeng2492 - 07.11.2019 05:41

You make a good video B

Ответить