0 votes

I want to make enemy move randomly arround the map. When i implemented this, my enemy get stuck in game's geometry, I tried to use navigation node enemy always move towards origin of navigation node.

Pls Help me to get around this.

Godot version 3.3
in Engine by (188 points)

Have you tried random rotation left or right?

yah this seems to help

thanks

2 Answers

0 votes

I dont know if you want a specific behaviour, but what you could do is send the enemy in a random direction and then use a raycast to check if there's something in front and when the raycast collides with something, the enemy choses a new random direction.

by (298 points)
0 votes

You could create points in random position in which direction your enemy will move. If enemy hits this point (or area) then will be created new point etc.

by (38 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.