Destroy Physics Joint

0 favourites
  • 6 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • I modified the Physics plugin to add an action that destroys all Physics Joints. All is well until I get this error in the console, then it can't register any more joints as well as other weird behaviors.

    <font face="Courier New, Courier, mono">Uncaught TypeError: Cannot read property 'm_collideConnected' of undefined






















        (anonymous function)






    I added this code to edittime.js

    <font face="Courier New, Courier, mono">AddAction(901, af_none, "Break joints", "Joints", "Break all {my} joints", "Break all physics joints on this object.", "destroyMyJoints");</font>

    And this code to runtime.js

    <font face="Courier New, Courier, mono">acts.destroyMyJoints = function () {



    Here is the capx for the game the error occurred in.

    The frisbee will "stick" to a pole when it hits it and spins around it until you either right-click or press space bar. You can control the frisbee while it's on a pole in any of three ways:

    • Click on the frisbee to push it.
    • Use the arrow keys to move it.
    • Hold down the left mouse button anywhere but the frisbee. A white ball will appear. Move the mouse to hit the frisbee with the ball. When you let go the ball will disappear.
  • You're probably not breaking other instance's references to that object's joints. I'll see if I can add that action officially anyway so you don't need to hack the behavior yourself.

  • Hey Ashley, would be possible to incorporate tags to joints when you create them to allow to selectively destroy them later?

  • Yeah, that would allow finer control... I'll see what I can do...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you, Ashely

  • Sorry to necropost this suuuuuuuper old topoic . Ashley Do you think it's feasible to be able add tagging joints so we can destroy specific ones like mentioned above?

    If not I can use the workaround mentioned in the physics manual page. Thanks!

    [I saw this post when I was searching to see if this was possible. Which is why I necro'd rather than posting a new one]

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)