0 votes

Hi

I'm new to Godot and I want to make my first FPS game with this engine. The FPS part itself is already done. I got stuck making an enemy, the enemy I want to have is very simple, he just follows the player in the 3D space.

Can someone help me implement this?

Thanks! :)

asked Jul 16, 2019 in Projects by Gelgavish (14 points)

1 Answer

0 votes

Simplest pseudo-code, I guess:

func _physics_process(delta):
  var to_player = translation.direction_to(player.translation)
  move_and_slide(to_player * speed)
answered Jul 16, 2019 by Dlean Jeans (3,864 points)

How would I add gravity to the AI character?

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.