Objects automatically move toward another object

I want to make one cube can automatically go to attack the other cube. How can I do?

1 Answer

1

Write a script for it. Just have it move toward its target with Transform.Translate What you mean by attack I am not sure but you could periodically check a sphere overlap and subtract the health of the other cube? You'd have to write a health script as well.