Beat Em Up question about Enemy physics.

In a Beat Em Up, if the Enemy runs an dash kick’s and you are on the edge of the screen, they knock you down an keep moving well beyond the screen.

What can I do to null their physics and momentum the moment they get off screen and then they can begin their walking return facing in bounds /their assigned player they are going to?

Any help is appreciated, thanks.

Hi there,

If I understood correctly, you might want to limit the combat arena and have its boundaries aligned to your camera, assuming you’re using a fixed camera angle. Overlap spheres or boxes can be coded to check actors’ location. Then, I see a few options:

  1. On Enemy targeting the player, before launching the dash attack, check if player’s location is a bit far from the edges (perhaps around 2 m). If so, do the dash attack with reduced/clamped hit impulse. Else, change the attack type for something more convenient.
  2. On dashing towards the player closer to the edges, reduce the hit impulse or just play a death montage with a notify to go ragdoll when the player is almost hitting the ground. That would prevent the player from flying outside the arena.
  3. If player goes flying, the overlap spheres will detect enemies going outside boundaries and change their behavior accordingly.

I really hope these options give you some insights.

1 Like

They do, thank you.