What I want to do is to break an object(cube) that has a collider attached to it, in 2 pieces when another object collides with it. I’ve already did the colliding part, and it works, I just need to put another thing to happen there.
For you to understand better I am doing a scissors that cuts a paper(cube) and when it collides with the paper i want the paper to break in half, and see a little space between the 2 halfs.
Thanks!
Herre is the code:
if you are a cutting the paper always in the same place, you can create the 2 resulting peices in advance and just activate them and deactivate the original object. If you are always cutting into 2 new cubes, then again you can just create 2 new cubes with the right sizes on the fly. If you are cutting at an arbitrary line, then you would have to create 2 new meshes with the Mesh class…
Thank you, I forgot to say that I’ve did something like that already. I’ve overlapped the 2 pieces, and when the collision happened, the uncut piece disappeared. How can I make an object activate or deactivate? (visible or not) because I did not find any function in the manual and It must be something.
The thing is that I would like to cut the paper progressively, maybe in 5 steps. On every collision It must cut a portion, and on the final cut it must break. Maybe attach health to it? If this is too much the activation/deactivation part would be fine.