Good morning.

Before I start making my first game, I want to know if Godot is capable of doing one of the main mechanics.
What I want to do is that when the main character attacks an enemy or an object, the part of the mesh that comes into contact with the weapon becomes invisible.
It is something like pretending that a part of the object has been destroyed.

I am considering the following options:
-Make that part of the texture invisible.
-Eliminate the polygons that the attack touches.

Would it be possible to do either of those two options?

Thanks in advance.

    if possible, making the texture invisible and returning the collision disabled (sorry for some discrepancy in this message I'm using google translate (why didn't I pay attention to it in my English classes, damn quake lll))

    This is 2D or 3D? You could make the objects separate pieces (like a person could have a hand as one piece, and upper arm, a lower arm, etc.) and simply hide the mesh if it gets hit. This works in 2D as well if you use puppet style animation.

      cybereality Thanks for your answer. It's 3D.
      But won't having so many separate pieces drastically reduce the performance of the game?

        You can swap out textures with a transparent version (or with some parts transparent) but then the whole mesh/material will need transparency and that has a cost.

        You can also make several versions of a character with different parts missing and switch out for a whole new model. This works, but can get complex if a lot of parts can be chopped off and you have to make exponentially different meshes.

        Marcos88 I am considering the following options:
        -Make that part of the texture invisible.
        -Eliminate the polygons that the attack touches.

        Would it be possible to do either of those two options?

        It is possible to do both.

        Marcos88 But won't having so many separate pieces drastically reduce the performance of the game?

        Everything has its cost. The best solution depends on the specific situation and implementation.