[BEHAVIOR] Chipmunk Physics

3 favourites
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • That video is a demonstration of all the joint types, they aren't rope. I think the was an example capx in the first post using a few joints. Any of the other joints should be as easy to use. If any don't make sense you can reference the chipmunk manual for a better description.

    I don't think I'll really be getting around to making any other capx.

  • help me please.

    Why Object with different masses

    fall with equal speed?

  • But. in Box 2d :

    Object with different masses Fall with different speed.

    How make this in chipmunk 2d?

    I need planet earth

    i need not vacuum.

    i want to , object fall with different speed.

    big mass is fast speed fall

    small mass is slow speed fall

  • Box2d doesn't do that.

    If you want to apply air friction to an object then apply a force in the opposite direction of motion.

    Or you could play around with the linear damping property.

  • Very very Thanks You!

  • Im curious about performance on mobile, also will this work with C3 ?

  • You'd have to test it and see how it performs on mobile. I've only tested the html5 export and I was never concerned with performance tests because this is just a wrapper to an existing js library.

    Also as with any third party plugin/behavior in C2 it won't work in C3 unless it's converted over. No plans to do so though.

  • R0J0hound , I'm having an issue with tile collisions polygons. It seems like the polygons are generated fine when the tile is index of 0, but if it is a different index, like tile 1 or 2, etc, the polygons don't combine together.

    Is there a way for me to confirm if this is the case? How can I fix this if it is?

    ..maybe a bug in the tilemap object??

    edit: the tilemap's collision rects property value in debug remains the same when I replace tile type 1 with tile type 0, so maybe it's a chipmunk bug.

  • Okay, so.. here is some more info..

    Seems like if I modify the tile's collision poly, then Chipmunk separates it into another group or something. Moving the points back won't revert it, I had to right click and set the collision poly to bounding box for it to combine properly.

    Maybe there is a flag somewhere that is set if you set the poly to bounding box, and it is toggled when moving the points?

    Anyways.. kind of interesting.. Basically if a tile is considered a polygon(not bounding box), then it won't combine with tiles that are considered of bounding box type.

  • That's expected. It's C2, not the behavior that combines tiles with bounding box collision polygons. I haven't looked in a bit but I'm sure it keeps track with a flag. Once a tile's collision polygon is modified it can't be combined with neighboring tiles. I mean we could come up with something to do it but it wouldn't be fast.

  • Alright- makes sense.

    I only need the bounding box type for my specific case, I was just confused at first but figured out I had to reset poly to bounding box (can't just drag the points to the corners).

    Chipmunk still is very great to use- one of my main reasons I use Construct2.

  • I'm glad it's still useful.

  • Is anyone else having problems with the built-in save/load system, the physics seem to lag behind a fair bit.

    https://www.dropbox.com/s/gsuj4ni4vnjvfj6/chipmunk%20problems.capx?dl=0

    Have you or anyone else found a solution to the pausing after loading a savestate?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Saving the game seems to record the tickcount and time, etc... I noticed that loading after waiting a bit causes the pause to be prolonged.. I think the Chipmunk behavior is waiting for the time to catch up to the simulation.. Because when you load, the time/tickcount goes back in time..

    So now, I'm going to explore the plugin and see what can be done about it..

    edit: yep, when I wait and then save game.. then reload the game and immediate load the state, it instantly starts moving because the time being loaded is in the future.

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