Physics: Human - animations/joints/rotation

Get help using Construct 2

Post » Sun Nov 01, 2015 11:40 pm

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.
ImageImageImage
B
39
S
22
G
11
Posts: 492
Reputation: 9,925

Post » Mon Nov 02, 2015 12:06 am

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 02, 2015 1:15 am

LittleStain wrote: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
ImageImageImage
B
39
S
22
G
11
Posts: 492
Reputation: 9,925

Post » Mon Nov 02, 2015 1:25 am

2D Fighting Games use rectangles and circles that are pinned to bones or in this case, imagepoints to simulate a moving hitbox,
Image
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
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,461

Post » Sun Jan 03, 2016 4:42 am

Message: badmoodtaylor is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
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
ImageImageImage
B
39
S
22
G
11
Posts: 492
Reputation: 9,925

Post » Sun Jan 03, 2016 4:43 am

Whoops, I can't post URLs . . .

I guess PM me for the URL?
ImageImageImage
B
39
S
22
G
11
Posts: 492
Reputation: 9,925


Return to How do I....?

Who is online

Users browsing this forum: mihirolover, tarek2 and 12 guests