How to Make a "Chasing" Sprite

I’m trying to make a sprite that will constantly move towards the player sprite. Using pathfinder behaviour I’ve been able to make it follow whenever the player character moves, but it also stops as soon as the player stops. How would I make the “chasing” sprite constantly move towards the player sprite at a fixed speed? I’m working in 2d at the moment, with a player character with the platform character behaviour.

Thanks!

Here is the Basic AI example which uses raycasting to find and follow the player
https://editor.gdevelop-app.com/?project=example://basic-artificial-intelligence

Ah wonderful, thank you!

Another option is to use the PathFinding behaviour on the chaser sprite, and set the path to target the player every time it no longer has a path.

1 Like