How to make ememy not to fall off cliff but stop at it

I want my boss to stop at a edge but nope he falls off how do i do so?

Raycast at a 45 and 135 degree angle. If it misses, stop moving (or move in opposite direction)


just make a block (solid:off) enable collisions-alpha[0] and use advanced or simple enemy example Flowlab Game Creator - Enemy Movement

1 Like

the reason you do it the way i say is so then the block is invisible and player can walk through it!

2 options that work pretty well for me, the first one is easier to do.

  1. Use an invisible object (not solid) that it can collided with to turn the enemy around.
  2. Using Raycasts pointing 45* and 135* downward always looking for ground.
1 Like

yay approved @Qwen just ask if you need any more help, id love to help you…

Thank you for the help everyone

1 Like

The advantage of ray casts is that you don’t have to place an object whenever there is an edge, and if you have free edition it saves a block. The advantage of a block is that even if there is not an edge you can make it turn around.