[BEHAVIOR] Chipmunk Physics

From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • R0J0hound , thanks for the info. Are there any cases that you know of besides 'on pre collide' where this may happen? I just experienced the freeze without any 'on pre collide' actions. Maybe it tried waking up in the 'on pre collide' even though no actions were ran inside the event?

    I'm going to disable sleeping for now- I don't plan on having too many objects at a single time.

  • I'm not aware of any others besides the collision pairs loop i think.

  • Wow the work put into this, stunning! Thanks for all your hard work!

  • Whats a good way to handle a simple knockback... e.g. object 1 hits object 2, knockback object 2 at the angle it was hit.

    I've been testing a few things with the various chipmunk actions and nothing seems to work

  • Badmiracle

    Usually if both objects have the behavior, the knock back is automatic. Or if you want it to be more severe you could apply an impulse on post collide. If one object doesn't have the behavior you can still apply an impulse.

  • R0J0hound , I'm trying to get the object being collided with inside a 'for each collision pair' loop.

    It seems to work when objects collide, but then afterwards it just returns 0 for the Chipmunk.CollisionOtherObj value.

    This is strange, because the loop runs when objects are touching each other after colliding, but the Chipmunk.CollisionOtherObj returns value of 0.

    I need this, because the recent colliding object may not be the value I want if the object colliding is resting on another object and stops touching the recent collided object. I want it to return the original colliding object it still is touching, but it won't until it re-collides.

    edit: I might be able to use an alternative method by checking if things overlap..

  • Badmiracle

    Usually if both objects have the behavior, the knock back is automatic. Or if you want it to be more severe you could apply an impulse on post collide. If one object doesn't have the behavior you can still apply an impulse.

    Apply impulse at offset just makes for some wack behavior - sending objects rotating rapidly, and not stopping... how do I just make a simple knockback and what else do I have to adjust to prevent the impulse for remaining forever

  • It seems that object.Chipmunk.ContactCount doesn't return anything, alongside with other expressions that are supposed to, why is that ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Prominent

    Sorry, I haven't had a chance to look into it yet. It's probably one of many edge cases I haven't handled.

    Badmiracle

    When using the apply impulse action the first vector is the impulse and the the second is the offset from the center of mass. Leave the second one to 0,0 and it souldn't add rotation.

    X3M

    Those expressions only give values under the pre/post collide triggers or under the "for each collision pair" condition.

  • R0J0hound

    Is there a layout size above which Chipmunk stars loosing precision/becomes unstable? I managed to find this thread:

    https://chipmunk-physics.net/forum/view ... f=1&t=2771

    which states that Chipmunk uses double precision, so layouts of around 100K in size should still be fine, right?

  • R0J0hound - Unfortunately it is not working for me on the latest version of C2 and fails to load with the error:

    Found " 'GetPluginSettings' global, but it is not a function "

  • R0J0hound - Unfortunately it is not working for me on the latest version of C2 and fails to load with the error:

    Found " 'GetPluginSettings' global, but it is not a function "

    adcornaglia

    Are you certain you installed in the 'Behaviors' folder and not the 'Plugins' folder?

  • FunkY Koval

    In JavaScript all numbers are double precision, so I doubt it's an issue with a layout that size. It would be the same with any other behavior.

  • > R0J0hound - Unfortunately it is not working for me on the latest version of C2 and fails to load with the error:

    > Found " 'GetPluginSettings' global, but it is not a function "

    >

    adcornaglia

    Are you certain you installed in the 'Behaviors' folder and not the 'Plugins' folder?

    That was it.

  • R0J0hound I'm testing the plugin and not see "compare velocity" in the physical ... that this plugin is the alternative?

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