Using force with mouse?

Is there a way to put force on an object while it’s being dragged with the cursor?

Like for instance, the player is supposed to pick up a box with their mouse and throw it against a wall to break it. Like that?


This was recently added! It’s called Draggable Physics. Basically, the object you want to drag needs to have the Physics2 behavior, and the draggable physics behavior (downloadable from the extension store). Your walls must also have the Physics2 behavior but set to Static instead of Dynamic.

To destroy a box for example, you could check when the wall and box are colliding (physics colliding condition not the regular collision condition) and check if the velocity is greater than some number. I made a quick mock-up of this scenario to test this idea. Not sure if the link will work, but try it here: click me!

If the (linear) velocity is greater than 500 when hitting the wall, the box explodes!

Lemme know if you need some more help!