How to take damage from a heavy RigidBody hitting player?

Godot Version



What’s a good/proper way to detect if a heavy RigidBody has hit the player?

As an example: think of a wrecking ball. It would cause damage if going fast enough and hitting the player on one side. But not if just touches the player, it has to touch the player on the same side it is swinging as. And if it’s just sitting doing nothing or barely moving it wouldn’t hurt the player.

What approach would you take to detect if it should cause damage or not?

You can add Area(a little bit bigger than body) to detect collisions, you can check their positions and velocity