How would I optimize a Ragdoll System?

Hey! I’ve recently been working on my own ragdoll system, simply because I profoundly love ragdolls.

Inspired by games like Advanced Euphoria Ragdoll and Motion Euphoria Ragdoll, I got to working on it, getting results I’m proud of, and now trying to “fake” some euphoria-like behaviour.

But I couldn’t help it but worry about performance.

I already have in mind using the client for some of the more demanding logic, like footplanting, and different ragdoll animations depending on the scenarios, but the little testing I did gave no good results.

The system uses the SpringConstraint method to animate the ragdoll along with a fake copy of the character to better fit animations into different body scales.

But creating the springs from the client would not affect the ragdoll at all, making it sound impossible.

I was wondering if someone had any advice for this matter, any knowers?

2 Likes

Hey I don’t know if you’re still working on that script but how did you get such a smooth result? I don’t know what method your using and can’t find a good one. Mine is so glitchy https://gyazo.com/3e23a3d591854f1fb04ff883f864ea43

1 Like

Well that doesn’t really answer my question, either way, perhaps contact me on Discord and I might be able to help out.

Could you clarify how you measured your results? How do you know your current results aren’t good? Your framerate looks smooth in the video.

Have you used the micro profiler?

Also could you clarify more on what this means? I don’t understand your question.

Ah this is kind of an old post, I am currently working on a different project so I can’t remember very well.

The animated character in the background plays animations, and spring constraints move the ragdolled character’s limbs to sorta match the animated one.

When in the ragdoll state, physic constraints created from the client just dont affect the ragdoll limbs.

It could be that perhaps I’m overthinking it, past experiences have made me a little scared of using RunService in the server.

That’s unusual behavior. If you do all constraints clientside and have network ownership of the parts you shouldn’t get issues.

Try one of these things and see if it’s fixed:

  • set all baseparts of the cloned player model to have the player as the network owner
  • standardize the constraints to all be on the player’s client, don’t mix between server and client constraints

For this application I wouldn’t use server-side RunService. The only time I’ve need it was for hit detection.

I hope this is still relevant to your work. I didn’t see that the post was 2 months old!

BallSocketConstraints on the client?

Create all constraints on the clientside.

This kinda just brings 20 different problems