R3X-G1L6AME5H / Godot-Active-Ragdolls

Godot plugin that allows for Active Ragdoll simulations.
MIT License
48 stars 4 forks source link

Broken skeleton after applying the plugin, and/or a T-posing skeleton when running the game #4

Open Favkis opened 1 year ago

Favkis commented 1 year ago

I tried adding this script to red character, used buttons to create rigid bodies, joins, set up skeleton for them, and this is what I get, red just plays running animation and blue is broken image

I tried doing it on my character - no luck either, rigid bodies just chilling in their rest pose image

I tried calling skeleton.start_tracing() and starting ragdoll, nothing changes image

Godot 3.5.1 stable official

R3X-G1L6AME5H commented 1 year ago

First thing's first, sorry for the late reply.

Second, for the first image I suspect the joints aren't configured correctly(I see the animation is applied alright, but the rigid body spasms out). That is to be expected. Getting it to look somewhat decent is an art in-and-of-itself.

It boils down to getting the weights on the rigid bodies correct(I use this for humanoid skeletons), and fiddling around with the joint properties till it works. It helps to know how joints work, or better yet how they are configured in other Game Engines. It was a long time ago but I'm pretty sure I followed a Unity video, and copied most of the configurations. Do note the matching_velocity_multiplier property on the joints. The forces exerted by the motors are rather weak, so I added it to allow for more snappier tracing. Its a double-edged sword given that it ONLY multiplies the force applied. Have it too high, and everything spasms; too low, and the animation is barely traced.

As unsatisfying of an answer as it is, its just a bunch of painstaking trial and error. I find it easier to first isolate(CreateRigidBody.gd has a bone_whitelist property for this specific purpose), and mellow out the effect(lower the velocity multiplier value) before ramping up the forces.

As per the second picture, I am a bit confused too. RigidBodies can't just "chill"; quite the contrary, they should be forced to do physics calculations absolutely. Even with joints, or tracing enabled, it should in the very least collapse into a puddle, or spasm out. It could be that the Bullet physics engine isn't selected(See README.md on how to enable); joint motors don't work without it. If not, we both better pray its faulty configuration, else there is nothing that can be done about it till Godot gets patched.

With this I conclude my report. I'll find time to write up a configuration guide, since this is a reoccuring problem(if my diagnosis is indeed accurate). Maybe I'll provide some skeleton templates, but that will take time to create so don't look forward to it. No programmable way to do it since a skeleton may be look like anything, really. And so the plugin is stuck as it is.

I hope something here helps.

Sencierly, Dev.