Hello,
Took an unplanned break. I hit the wall pretty hard when summer vacation ended, the pace seemed to be fine at first but after a couple of weeks I got sick. Nothing serious, but a reminder to not push myself too hard. In addition to this my day job is pretty intensive at moment, with a trip to France coming up in the next few days and a couple of heavy weeks back home following that, so updates will be sporadic for the time being.
-
Anyways this will be the last update on the ragdoll, it feels like I've been working and talking about this subject for too long. I will also keep this update rather short because of the aforementioned reasons.
The RagdollThe ragdoll consists of 17 different gameobjects attached to each other with different types of joints, namely "Distance Joints" and "Hinge Joints". These will force gameobjects to stay connected and limit bend angles of legs and arms.
Each sprite of the main torso overlaps nearby sprites, to allow for extension, compression and rotation without creating gaps.
Surprisingly it works and looks reasonably well. The major issue with it is that a Frankenstein construction like this never stops moving in Unity, it will just wiggle about forever sometimes. So some code is needed to try and detect when the whole thing should just become static.
Endless jittering.I've tried various methods to achieve this, you can increase friction of hinge joints, which in my case helps a bit with the legs and arms. Ultimately I settled with making them static if the aggregate position of the whole body is still / moving very slowly. Sometimes this will freeze a leg or arm in a slightly awkward swing position, but this happening and being noticeable during actual game play is very low.
Activating static ragdoll when crate is destroyed.There are still a few more things to be done before its 100% finished, adding dust particles when it slams into a solid wall / object, and maybe allowing parts to be destroyed or ripped off is sufficient damage is dealt.
-
I have started polishing the second area of the game, hoping to share some of that work in the coming months.
Thank you for reading, and thank you for comments, suggestion and feedback.