0

Making a game object walk towards another game object.

PET 3 years ago updated 3 years ago 1

Hello guys,

so I'm having this small problem.

I have 2 game objects that are going to use the same AI (so far). Whenever any of them detects an "enemy", it should walk towards that enemy.

So I don't know how to use the Translate properly. I know the location of my enemy (which can change btw), and I need to use my float "speed" variable to walk towards the enemy.

Any idea how to do this correctly?

Thanks

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):