Does anyone using "Chipmunk Physic" ?

  • Hello

    I try to use Chipmunk physic joint and I found that it have many joint option to use.

    Normally I use ordinary physic "create revoulte joint"

    When I try to choose its config to look very complicate.

    Can anyone help to teach me or share link to learning ?

    PS: I searching in google but not much what I looking for

  • Here is CHipmunk

  • this video shows all the chipmunk joint types: youtube.com/watch

    when you add a joint, there are various properties you set, mainly where the joint positions are located.

    You can choose between various ways to input the positions, such as:

    Layout- which will take a position in the layout.

    Rect- which is a relative position to the object (for example; x=5 would be 5 pixels right of object origin, and y=10 would be 10 pixels below object origin).

    Polar- which is an angle and distance from an object's origin point (so an angle of 270 point up, and distance 10 would be 10 pixels up from object's origin point).

    Imagepoint- which is a current position of an imagepoint on the object (the second parameter would not get used in this case; only the first parameter which is set to an imagepoint index number).

    Some joints require a different number of parameters to be set based on the type of joint it is.

    You would add the action to one object, and then supply the UID of the other object it is connecting to in the parameters.

    There is also a Tag property that can be set so that you can use other useful expressions after creating the joints. The tag is basically a unique name for the joint. You supply this tag in expressions to retrieve properties of the joint after it is created. So you can destroy joints with tag "uniquename" for example, or return the joint type, or the current anchor position, etc..

    there's a lot of info in the behavior thread: construct.net/forum/extending-construct-2/addons-29/behavior-chipmunk-physics-82151

  • Hello, THank you sir.

    If I create many layouts with 1 event sheet, the obj UID always different of each layout.

    Not sure, do I have to create every event sheet ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That depends on what you're trying to accomplish.

    If you set an object's global property to Yes, that object type won't be destroyed when a layout changes. So in that case, it should keep the same uid when the layout changes.

    You can also retrieve the Uid of any picked objects at any time, so if you need to find a uid of an object to create a joint with, you'd pick it via some conditions first, and then use it's uid expression such as Spritename.uid

  • Hello Prominent.

    Thank you for comment, I just know from you that we can set global on object. I will try.

    However I'm inspired to create a bicycle which had 2 wheels

    Link >>

    youtube.com/watch

    Which kind of joint I should get ?

    I think between wheels should "gear joint" however between wheel and bicycle body ?

    Pls kindly advise me, I just step in for Construct 2. Thank you

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