• 2D
  • How do you overlap between 2 different kinematic body?

Both the character and dummy has area2d with collision. I can attack him too when I press LMB. But how do I overlap with this dummy? but can still attacj him at the same time when overlapping.

I'm a little confused on the question. How does your character attack? Does the attack have an animation, does a sword poke out? If a sword poke's out, you could attach a Area2D to the sword and use the on_area_entered signal to detect if the sword hit another Area2D node like the dummy, applying damage when the on_area_entered signal is emitted.

Also, based on the screenshot, your Player and Dummy nodes are actually KinematicBody2D nodes, not Area2D nodes. Since they are KinematicBody2D nodes, by default they will not be able to overlap if you are using move_and_slide or move_and_collide and the nodes are on the same layer. If you want them to overlap but still use KinematicBody2D nodes, you will likely need to adjust the collision layers and masks so they can still collide with the world, but not with each other. The simplest solution may just be setting the collision layer for the Player and Dummy to layer 2 instead of the default Layer 1.