A
A
Arseniy Sokolovsky2021-03-09 23:14:58
Unity
Arseniy Sokolovsky, 2021-03-09 23:14:58

How to make an enemy roam the world (Unity3D)?

There is an "Enemy" object, it has a collider and a Rigidbody, I can't make it so that, for example, like in the Granny game, it just moves around the world and if it sees the player, it chases him.
I found a couple of scripts on the Internet, but they do a little not what I need. It's just Enemy heading towards the Player. I myself tried to make a random movement, but alas, nothing happened. Can you help?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2021-03-10
@SokolarGm

Use NavMesh to navigate through the level. Choose a random point on the level and send the enemy there. Periodically check the player's proximity to start chasing them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question