Cutting objects and letting them fall "naturally"

Greetings,

So, my friend and I are trying to create a, hopefully simple, game where a player can cut objects and the cutted fragments are supposed to fall to the ground (“by nature’s laws”). An object should be cuttable on any position.

We’ve tried with a factory of collision objects which creates new objects depending on the position where they’re cut and scales them to the appropriate size. However, this turned out to be a nightmare and it appears to behave quite random when changing parameters… (and we can’t really see if the collision object matches the real one perfectly) - quess there’s an easier way to do such a thing.

The fragments should collide with static ground objects.

This is our first time using this engine and we couldn’t seem to find a solution around here.

Cheers,
Andrija

1 Like

To see the physics world, you can toggle the physics.debug flag in game.project, or send the message toggle_physics_debug

1 Like

Thanks for the reply, we’ve moved a bit now - when we saw how the object looks like inside.

However, now we’ve bumped into a known problem (DEF-521) Scaling Collision Object when Game Object is scaled (DEF-521)

Is there, perhaps, a workaround on our specific problem if the bug isn’t dealt with yet?

To simplify the problem:

We have a tree object, “standing” upwards, the player should be able to cut it (straight horizontal line) and the chopped-off piece (rectangle shaped) should fall down to the ground.

P.S. We needed scaling only by Y axis

Unfortunately, no, I don’t see a good workaround for that particular case.
You can change the scale when creating the object from the factory, that is a poor substitute for a smooth animation.

We have started working on that issue, but it was down prioritized in favor of other issues. But we’ll pick it up again for sure. Uclear when we’ll get to it though.

1 Like

Maybe @britzl 's Chipmunk2D extension might let you do what you want

1 Like