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.