Sword slashing games

how to make a collision with sword slashing and enemy.
and please explain how it work

If you use builtin collision objects you can disable / enable collision objects where you want sword hit detection to be possible. Or you can ignore the collision messages on the frames where the character is not swinging a sword.

You can read about collision components here https://www.defold.com/manuals/physics/

2 Likes