D
D
Davilkus Games2021-11-23 15:47:15
Unity
Davilkus Games, 2021-11-23 15:47:15

How to implement search for shelters and reaction to grenades?

I need to implement cover search and reaction to grenades (run to hell!) for AI in Unity (using NavMesh).

Who fumbles, could you please give a couple of tips - how best to implement this?

At the moment (in the prototype) AI reacts to grenades with a trigger.

So far, I know 2 ways to search for shelters:
1) manually place shelter points and then look for the nearest one, check with Raycast at the player (is the shelter accurate?) and run there.
2) Automatic generation of shelters (I don't know how to implement it).

Are there any features in Unity or assets that allow you to automatically place cover points (can be paid)? Or what is the best way to write your own algorithm?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2021-11-23
@Davilkus

The grenade has a range, so you can take all the cells in this zone and check how much they protect from the grenade and the player. Choose the best option.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question