[SOLVED] Aaaand...another Ragdoll question

0 favourites
  • 11 posts
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • Hey everyone.

    I'm currently challenging myself in creating a hangman-ish game with a physically interactive hangman.

    Creating a ragdoll isn't that much of a problem, but attaching the head of the ragdoll to the gibbet seems to break it.

    What I want is to have the ragdoll simply hanging on the gibbet, but being physically interactive.

    What happens, is:

    • the head doesn't rotate anymore (and so do the connected objects)
    • ragdoll objects stop moving completely after some time

    I used distance joints and those are definitely needed because of my Sprite's layout.

    I also disabled collisions between the ragdoll objects (as mentioned here by silkc2) and added a delay before adding the joints (as mentioned here by R0J0hound).

    Here is my .capx:

    Download

    Any help is greatly appreciated.

  • also on start disable dude Physics..wait 0.1...enable

  • korbaach

    Great, that solved it! Thanks!

    Though two questions:

    • Why/how does the collision polygon affect joints?
    • why is it necessary to disable the physics and re-enable them after a delay?

    Thanks again!

    EDIT: this also solves issues with revolute joints I had before. Awesome, thanks!

  • why is it necessary to disable the physics and re-enable them after a delay?

    because Dude will fall down..

    just think as he have platform behavior..you have gravity..and gravity will not wait 0.1 second..

    Why/how does the collision polygon affect joints?

    gallows colision poligon will affect on head sprite(gonna push him)

    just think as solid a platform..

  • The wait shouldn't be needed in this case. Wait is only needed when you create a physics object with events and you want to add joints to it. Why? because the behavior needs a tick to update the positions in the physics world. It's a quirk and when I made the chipmunk behavior you don't have to worry about such things.

    Anyways with your capx you just need to disable collisions between your physics objects. The collision polygon means they are overlapping so they will move out of each other and the joints will try pulling them into each other so it turns into a fight.

  • R0J0hound

    Thanks, did that, worked.

  • R0J0hound

    korbaach

    got another issue.

    Thanks to you two, my project advanced and I now need to dismember bodyparts (god that sounds harsh).

    That's what I got so far: (not very much since I don't want to continue before I got this solved)

    Main event sheet:

    included event sheet "puppet control":

    The dismembering doesn't work when using the disabled event, but when I use the event below that.

    (The layout definitely isn't the issue since it stays the same no matter whether it works or not)

    I'd like to have all joints-creating events going from the body to the body part.

    But apparently, that doesn't work, it just works when it starts at the body part.

    Which is weird since the event "Remove all joints", according to its description, is supposed to remove all joints "from or to" the object.

    Maybe a bug?

  • randomly you still need help on this?

    even if not i took your first capx and created a hanging animations based on your ragged doll was more of a setting the right values really... also if you want to brake a leg or hand .... lol ... it does sound weird... just disable that joint from the body...

    here it is

  • Can't open the project since I'm still using r239. Got some issues with the download. (Currently in a location with bad internet, connection breaks with files larger than 30mb)

    Could you edit your post and add a screenshot of what you changed?

    ______________

    just disable the joint from the body

    Yeah, but that would disable all joints connected to the body, not only the arm..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > just disable the joint from the body

    >

    Yeah, but that would disable all joints connected to the body, not only the arm..

    R239 Capx

    i re-attached the limbs to the body on a order where you wold be able to cut them off without worrying to much about the body flying away... however no matter how many times you edit it..

    the problem is this : each Original point 0 is the point of gravity or point of weight of an object if you move it down the point of gravity will pull from that part

    imagine, you have a stick inside a iron ball and you can slide up and down the iron ball, wherever you move the ball that will be the center of gravity for the stick from now on...

    thats how image point 0 works... its complicated... to explain in forum chat... but i hope you get my idea...

    also object position in Layout editor matters when you create the joints... if positions are irregular then joint will be either to long or to short thats why the weird shakings and all that....

    image the joint being an invisible rope. hope my logic of it made sense to it... and the capx helped you in your project.

    Edited: also density which affects the way of world gravity and object heaviness is direct proportional with the density value you input and the size of collision box .... also the origin point 0 you have to have it dead center on X axes if you want things to be balanced...

    but not on the center of the image... but on the center of the collision box.... image the collision box as being the filled material of the iron ball from the above stick... if the ball is missing one part then its weight and gravity point changes ... physics behavior is very complex to explain... ... need to make a live feed for it or record a entire video.

  • i re-attached the limbs to the body on a order where you wold be able to cut them off without worrying to much about the body flying away

    Yeah, managed to do that too, but I was wondering why you have to do that since the "Remove all joints" action is supposedly removing "all joints that are connected to or from an object". If that was the case, it wouldn't matter where you start the joint right?

    And thanks for explaining the image point 0 - center of mass issue!

    (by the way, the .capx still doesn't work in r239..)

    Nevermind, managed to download it. Thanks for your help!

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