[BEHAVIOR] Chipmunk Physics

From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Hello,

    Thanks to you for the work done with your plugins. It's really helpful as I had troubles using Box2d and asm.js, with crash and can't fix it or neither understand. Some people have same problems of various threads in the forums, so your plugin is the only alternative.

    Many thanks !

    What is the difference between box2d linear damping and chipmunk one ?

  • The box2d one is per object, whereas the chipmunk one applies to everything. You can replicate per object with a force proportionate to the object's speed and in the opposite direction.

  • I have a box with physics behavior falling from top to down when i touch the box i set the max speed to 40 which allow me to decrease the speed of fall and everything is okey the issue is when i want to change the direction of that box ( after the click) with swipe left or right i have tried the force but it doesn't work, the box is still fixed on the same target.

  • MarkeGamer

    Perhaps use a larger force?

  • Try Construct 3

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

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

    Perhaps use a larger force?

    It's okey Thanks =)

  • Hi!

    i'm trying to solve a problem. When a box hits the ground in movement, the box doens't react to the speed of the groung and stays in the same place. What i'm doing wrong here?

  • tucamone

    Is the ground moving with the physics behavior? All other movement behaviors are unmoving to the physics behavior. Otherwise I don't know.

  • No, the ground is with bullet behavior. thats probably the issue. i'm going to change it. Thans a lot!

  • I still have a problem though.

    I got the ground moving, but to keep it running I need to change the gravity to zero. But everything around is affected.

    How do I change gravity individually per object?

    My project is based on two oposite gravities, up and down, and diferent objects must fall in oposite directions.

    With box2d I can't do this, and I though I could do this with the chipmunk, but I don't know how.

    thanks in advance for your help

  • tucamone

    Gravity is global so you could either disable gravity and every tick apply a force to each object so they have their own gravity, or you can leave the gravity on and cancel gravity on so objects by applying a force opposite the direction of gravity on an object's pre step.

  • I need two things that C2 Box2D can't do and Chipmunk sadly neither, at least it seem that way. I just want to make sure.

    1. Setup collision polygon during the gameplay (i.e. by event, programatically).

    2. Apply force from multiple points inside the sprite which need to be setup/adjusted during the gameplay, not before.

    The reason I need this, is the physics wrapping object that would wrap multiple adjacent squares as one. Moving dozens of joint squares might bring a huge performace issues + it doesn't work as intended anyway. If anybody is interested there i complete question:

    If there is a way to achieve this with the Chipmunk I would really like to hear it. I should have tried that before buying the license =( I thought changing things like image points or collision polygons via events is the natural thing to do.

  • mh11

    1.

    The collision polygon isn't something the C2 usually lets you do, and the behavior just grabs from that. The only plugin i know of that let's you change the collision polygon is yann's polygon plugin, but I haven't tested it recently to see if it works well with the behavior.

    2.

    It's very simple with this behavior. Just apply a force at an offset. The offset can be any point on the object and applying multiple forces work as expected

    For what you're actually trying to achieve the best current solution is to join all the objects together with physics joints, but even then it can't be completely rigid. A proper solution where all the joined objects form one rigid object is possible with the box2d or chipmunk libraries themselves, but nothing is exposed to C2 for design reasons. The question to do it has come up before and my proposed solution then was to use the chipmunk library with js instead of the behavior.

  • Well I think I chose the wrong tool for this particular idea. C2 seemed to have everything I need in simple and quick-learned package. Yet physics is not one of them. I've just realized I can create instances on the fly, but there is apparently no way to refer them from the physics engine. Well, my bad. I should have tried free edition first.

    I don't want to give up on C2 though. GM would take me a lot more time to get familiar with. That's why I ditched the idea of learning Unity in the first place. I have experience in coding in some languages but nothing suitable for games, plus it would take me ages to make something professional looking and fun to play. I like how you can make a lot with just several events, that would normally require tons of lines. As a game designer, graphic designer and programmer in one person, C2 is maybe one and only way to make game(s) in reasonable time and without spending months or years getting familiar with it.

    I'll try to re-think the whole concept without physics, but it will most likely destroy the whole gameplay. I've seen some very complex games made with C2, so I guess if I avoid physics for the time being, there shouldn't be "anything" that I couldn't do with C2. My OT stops here.

  • mh11

    I don't follow. How are you not able to to refer to them from physics? Guess I'll have to look at your other topic.

  • R0J0hound I haven't mentioned that there. I just found out. Maybe I'm wrong, I'm pretty new to C2. Whenever I want to make a joint or apply force with regular physics I can't see how to address specific instance in the event. It always applies to all of them. I couldn't find anything on that topic via google either.

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