hi everybody i make top down shooter game and i want to ask:
how to make that the enemies will follow the player when they close to him?
Give the enemies the line-of-sight behavior, set the obstacles to custom (unless you want the sight blocked by solid objects) and adjust the range to your needs. Set the cone of view to 360.
Now check if the enemy has LOS of the player and move it towards the players position.
Give the enemies the line-of-sight behavior, set the obstacles to custom (unless you want the sight blocked by solid objects) and adjust the range to your needs. Set the cone of view to 360. Now check if the enemy has LOS of the player and move it towards the players position.
thanks . how i make that the enemies will follow after the player without change their angle?
add a sprite on top of the enemy, every tick set position (not angle, just position)
this way you have a pathfinding floor piece, and a image of the enemy on top
Develop games in your browser. Powerful, performant & highly capable.
add a sprite on top of the enemy, every tick set position (not angle, just position) this way you have a pathfinding floor piece, and a image of the enemy on top
thanks. can i make that the enemy will follow after the player with bullet behaviour without change the position ?
danul777
and