# Cutting objects and letting them fall "naturally"

**URL:** <https://forum.defold.com/t/cutting-objects-and-letting-them-fall-naturally/31697>\
**Category:** Questions\
**Created:** [October 10, 2018, 1:06pm UTC](https://forum.defold.com/t/cutting-objects-and-letting-them-fall-naturally/31697 "2018-10-10T13:06:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Web\_Lord](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@Web\_Lord](https://forum.defold.com/u/Web_Lord)\
**Post date:** [October 10, 2018, 1:06pm UTC](https://forum.defold.com/t/cutting-objects-and-letting-them-fall-naturally/31697/1 "2018-10-10T13:06:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [October 10, 2018, 4:27pm UTC](https://forum.defold.com/t/cutting-objects-and-letting-them-fall-naturally/31697/2 "2018-10-10T16:27:00Z")

</div>

> [@Web\_Lord](#):
>
> and we can’t really see if the collision object matches the real one perfectly

To see the physics world, you can toggle the `physics.debug` flag in game.project, or send the message [toggle\_physics\_debug](https://www.defold.com/ref/sys/#toggle_physics_debug)

---

<div class="post-metadata">

**Author:** ![Web\_Lord](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@Web\_Lord](https://forum.defold.com/u/Web_Lord)\
**Post date:** [October 10, 2018, 5:42pm UTC](https://forum.defold.com/t/cutting-objects-and-letting-them-fall-naturally/31697/3 "2018-10-10T17:42:12Z")

</div>

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) (SOLVED)](https://forum.defold.com/t/scaling-collision-object-when-game-object-is-scaled-def-521/547)

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

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [October 10, 2018, 5:55pm UTC](https://forum.defold.com/t/cutting-objects-and-letting-them-fall-naturally/31697/4 "2018-10-10T17:55:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [October 11, 2018, 4:48am UTC](https://forum.defold.com/t/cutting-objects-and-letting-them-fall-naturally/31697/5 "2018-10-11T04:48:33Z")

</div>

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

[https://github.com/britzl/chipmunk2d-defold](https://github.com/britzl/chipmunk2d-defold)
