Find closest enemy - Unity Tutorial - Find gameobject unity

Find closest enemy - Unity Tutorial - Find gameobject unity

Indie Games Dev

4 года назад

11,351 Просмотров

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


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

AI-cid
AI-cid - 11.12.2022 09:05

nice tutorial, checking if something is NOT true can be done like this: if( !variable )

Ответить
MeanMachine995
MeanMachine995 - 26.09.2022 17:06

I would like to adapt this to a 3D scenario. Would this also work with a sphere Collider and normal Rigidbody?

Ответить
Gen of Wakatu
Gen of Wakatu - 28.08.2022 06:10

GetClosest enemy searches all enemies with the tag...not just ones in the radius...thats still rly expensive. can we add to a list and only search ones that have contact?

Ответить
GG Gamerzaid
GG Gamerzaid - 15.07.2022 20:51

I am getin the cs0029 error

Ответить
Kayra
Kayra - 03.07.2022 18:44

thx

Ответить
Suleiman Abdullah
Suleiman Abdullah - 11.05.2022 17:25

I have different enemy with different tags,how I would approach this scenerio

Ответить
Rushline Code
Rushline Code - 11.05.2022 11:10

if i put the collider in my character child, how can i acces it, if the ontrigger method are in my character parent?

Ответить
cyberspacecat
cyberspacecat - 18.04.2022 19:58

This was very helpful, I found very similar code while searching for this problem but couldn't figure out the way to implement it bc of a lack of array experience, appreciate the work!

Ответить
LittleRogue
LittleRogue - 25.03.2022 00:21

Enemies*

Ответить
Rayly131
Rayly131 - 20.02.2022 21:23

Great vid! After a many links and videos i finally find you, and code work!)

Ответить
BeautifulViewKas
BeautifulViewKas - 20.02.2022 20:09

Thanks a lot bro, this is very awesome video!!!
How to do it with lerp?(I need that 1 of resurses spawned with tag"Wood"(They all have tag Wood) doing lerp, just 1 of them to my character, another one prefab (Wood) stay on the same transfrom until 1 of them lerping to character)

Ответить
Linkedin2008
Linkedin2008 - 06.01.2022 23:43

good video I recommend watching in 1.5x speed he talks a little slow

Ответить
Bla Blu
Bla Blu - 25.12.2021 09:09

how to tab for change target? tks

Ответить
webplace
webplace - 04.07.2021 13:58

<3

Ответить
Mason Melaragno
Mason Melaragno - 08.02.2021 15:37

How could I make it so none of them can render a line except for the closest one?

Ответить
Case A Lace
Case A Lace - 02.02.2021 08:58

Thanks so much for explaining all this!!! Been trying to figure this out for days!

Ответить
Evan Raab
Evan Raab - 27.12.2020 19:57

getting a "Not all code paths return a value" error. Pretty sure I have the code in as you do - any idea what the stupid thing I'm doing is?

Ответить
kuuma
kuuma - 26.10.2020 11:13

simple and straight forward - nice tutorial :p

Ответить
SulkingCrow
SulkingCrow - 20.10.2020 07:42

This helped so much, also, thank you very much for explaining each part of the code and why it's needed, much appreciated! <3

Ответить
ASFilm Studio
ASFilm Studio - 08.10.2020 02:29

Thank you soooo freaking much you helped me a lot really

Ответить