[BEHAVIOR] Chipmunk Physics

3 favourites
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Prominent

    It acts crazy because the joints are pulling the blocks into contact which in turn try to push out of each other. Floating point numbers introduce a tiny bit of error so sometimes the objects won't be in contact but will overlap a little, which causes the fighting. Offsetting the points or polygon is a good solution. I don't think there's anything I can do in the behavior code, it's just how the physics works.

  • R0J0hound , okay, makes sense. I'll continue experimenting with your behavior.

    Thanks for the help, this is a great behavior!

  • Here's a test that plays a sound when object's collide. The volume varies by how much Kinetic energy is in the hit. You can fiddle with the equation that maps to volume to adjust it. In a similar way I added puffs of dust that spawn at the contacts.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Updated #9:

    Removed beta from name since it's pretty much feature complete.

    Edit:

    Arima linkman2004 or Kyatric

    Could this topic be moved to completed addons?

    Also a collision layers test:

  • This is a great plugin! I'll definitively use it:D

  • I had installed it already.

  • Took a look at your collision example and just wanted to say that I'm looking forward to utilizing these features, it will be very useful having collision data! Haven't had a chance to fully get into using this yet, but I will.

    I plan to remake some stuff I made in the past with box2d to see how it compares.

  • R0J0hound

    Does this support a concave polygon collision ? Or is it a bug that this doesnt work ?

    Thanks

    Edit: Sorry i just noticed you say they are converted to convex hulls. Is this a Chipmunk limitation?

  • spongehammer

    It is, concave polygons need to converted to multiple convex polygons to work. That being said It should be possible to do this inside the behavior with no difference to the user. The problem is it's a more complicated feature to implement, but it is on my todo list.

  • R0J0hound

    Can you tell me what segments are for and when they would be used. I looked at the Chipmunk Docs but i dont see where i would use them. What's the radius for?

    Thanks

  • spongehammer

    Segments are basically lines with rounded ends, which are useful for level design.

    In the picture the black is the collision shape. A negative radius insets inside the sprite. When segments are put together the rounded ends eliminate gaps that you'd get with boxes.

  • Updated to version 1.1:

    Fixed: bug with "set collision layers" action.

    Fixed: bug with "apply impulse" action.

    Fixed/Added: more support for Chipmunk2d's object sleeping behavior

    Fixed: Collision shape wasn't always aligned properly.

    Added: expression to get the uid of the other object of a joint.

    Added: action to sleep or wake up an object.

    Cosmetic change: moved the actions in the "velocity" action group to the "dynamics" action group.

    Here's example using segment shapes, collision layers and the "pick closest object" condition to do a sonic the hedgehog like loop.

  • R0J0hound

    Ah, thanks for that and for all the work you are putting into this very useful behavior

  • woah, that's cool. I was recently wondering how to do a sonic loop.

  • Is there a way to set linear or angular damping per object? I find those to be essential features of the in-built physics behavior for tweaking movement & doing things like underwater effects. Prevent rotation is another handy feature that's missing, but I suppose it'd be easy enough to set these with events.

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