How to make en explosion wich influnces character body?

Godot Version

4.7

Question

How to make en explosion wich influnces character body?
Yea… i have my player, i have my bomb,s and i have my enemys, (moving CharacterBody2D)
and i want tem to fly away when they get hitted by the explosion.
just like tnt influces tnt in Mine( raft, but in 2D

What about comparing the vector of the bomb normelizing it and using a jump veloceti? is ther a simpler way?

Are those enemies character bodies or rigid bodies?

CharacterBody2D,s
With a folow player script.

grafik

Well in your initial post there’s this as well:

For character bodies just apply a constant force for a short time, whose direction is from the explosion center to the body and intensity proportional to the distance from the explosion center. Similarly how you’d apply gravity, just in a different direction.

o sorry i messed this up :upside_down_face:.