Physics: Human - animations/joints/rotation

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

    I am thinking about making a human with physics behavior and how to make it realistically respond. Imagine a street fighter type game - character you control can punch and kick and respond realistically when getting struck - and like a ragdoll when getting struck with significant force (like an explosion).

    I have not started on this yet, I know it is typical to attach a project when asking for help, but don't be a hater - I am not asking for anyone to do all the work for me just thoughts from those that have used physics and their experiences - not complete solutions. I feel like this will take a lot of trial and error so even a small tip could save hours of testing.

    First of all, I was thinking...

    Animations:

    With reading in the manual about physics behavior not responding well to non-physics behavior, I would think that creating animations for punching and kicking (with arm/leg protruding) would not respond well with the physics behavior as it would be a sudden change in the sprites collision polygon (any experiences with this). If true, should all animations be excluded to keep physics engine from behaving unrealistically? Or will it have no effect if the collision polygon is unchanged?

    If animations are out then the only other option I could think of is...

    Joints:

    Create a sprite for each body part(head, torso, then left, right, upper and lower legs and arms) and connect them with a joint. Then if a force/impact is applied to the fist going away from torso hopefully arm will straighten out and objects struck will react realistically.

    This would also give the ragdoll effect when getting struck but leads to the issue of...

    Rotation:

    I don't want to prevent rotation or else when struck it wouldn't seem realistic - also so can get knocked over if hit hard enough - but don't want the character teetering back and forth like he's completely inebriated (maybe when health is low). Not sure how to handle this but thought to try:

    -make legs (lower or both lower/calf and upper/thigh) not rotate-able

    -preventing rotation and then enabling upon collision

    -giving lower legs high density and putting origin at feet (to try and weigh him down)

    Like I said - not looking for "solutions" as this is complex - just thoughts and experiences from physics users. I am looking to give this a try as soon as I get some free time.

    Thanks in advance for any responses,

    Chris

    FYI - I have read the manual on physics, looked at the physics templates (including rag doll), and searched the forums. I haven't come across anything like this.

  • My two cents:

    Fake it!

    A lot can be done with animations, maybe using something like brashmonkey spriter to do the bulk and only creating the ragdoll (or just parts) at certain times on impact..

    Full physics body movement is nearly impossible to get right..

  • My two cents:

    Fake it!

    A lot can be done with animations, maybe using something like brashmonkey spriter to do the bulk and only creating the ragdoll (or just parts) at certain times on impact..

    Full physics body movement is nearly impossible to get right..

    Initially thought this wasn't going to be helpful but point taken. I doubt I will be able to get a realistic fluid walking motion with using forces and impulses.

    For the sake of practice and learning I want to see how far I can take physics though.

    Has anyone played with using platform behavior and then upon impact disabling platform behavior and enabling physics? Not my first choice but as LittleStain said, I might have to fake it!

    Thanks for the input LittleStain

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 2D Fighting Games use rectangles and circles that are pinned to bones or in this case, imagepoints to simulate a moving hitbox,

    as for the physics behind the impact, You'd be better off using pre-made animations as most ragdolley games look very unrealistic and getting it right might take a lot of time

    I could knock you an example of the latter, hopefully tommorow.

    One more thing, physics in real life are in 3D space and you can't replicate a humanoid character perfectly if you only have x and y to work with, let me gove you an example, imagine you hit someone on the top of the left leg, as a result, the crotch zone will pivot but the right leg won't move the torso will have to be at a 30 degrees angle from normal, which would vary depending on the force of impact and can't be reproduced with a single torso sprite, if you see what I mean, you'd need 3D physics

  • There's something I threw together tonight - this is the concept I was looking for, not exactly realistic but the physics making the part hit move

  • Whoops, I can't post URLs . . .

    I guess PM me for the URL?

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