Muscles/Forces with Constraint Rigs

So for a new game I’m working on, we’re having custom characters and custom joints with Roblox constraints to act as the “skeleton”

The problem with just using Roblox constraints is that there are no forces/muscles to keep the character from just falling like this:
https://gyazo.com/f047c9193b6c2ac34fc3b109bdb7ff8a.gif

I feel like different parts of the body need to have “muscles” / forces acting on them whose magnitudes are possibly proportional to the distance between the current orientation/position and the desired. But I’m not really sure how to go about this - especially with basic things such as just keeping the character from falling to the ground and instead making it try to move to remain upright like seen in this gif

I don’t know much about creating custom characters, so we’ll have to wait for someone more knowledgeable for a full solution, but don’t try and make your character walk around using physics and simulated muscles.
Don’t.
It won’t work.
No-one does it that way apart from a very small number of niche games.
Move it around with a maybe a BodyVelocity or move it via CFrame or something and animate on top of it.

I want to do this to use roblox’s inverse kinematics to have dynamic animations
The other option would be to create my own ik system but that seems difficult to get right

Refer to this thread here for some info on IK from people more knowledgeable than me

I get the impression it’s not for the faint of heart though.

Edit: Also some more good stuff from @Stravant

Yea I saw that, how would I apply it in my scenario though? I don’t need to worry about the actual ik because Roblox is handling that for me, the only thing I need to do is have some forces acting to keep the body parts upright and not fall down due to gravity

What is it that you’re doing that stops you from using Roblox Humanoids? Do you just want to use a different rig from the default Roblox characters but otherwise keep the rest of the behaviour the same?

I’m using Roblox constraints to join the different body parts together not Motor6D
Also the rig for the custom characters will be at least have 16 parts (because neck joint), this is just a prototype rig

But why? As far as I’m aware if you’re trying to animate a full R15+ rig and Roblox’s animation system+animation editor arent good enough, you either have to find an IK system from someone else here or write your own. I’m not sure what using constraints is supposed to do?

Roblox constraints will solve IK for you, the example gif shows that, but maybe this is a better example:

(That doesn’t have gravity acting on it though, mine does)

That’s a specialised feature that only works in studio

making a flying part, containing attachment and Rope Instance. Make the rope invisible, connect to the head. That way the character should not fall.

Spring and elastic rope should makes it funny, the flying part should follow the RootPart slowly to make the character looks like a doll

This was just raw idea, calculating the rope length was another thing.

sent from phone

1 Like

Oh, you just wanted to pose the characters in Studio, thought you were trying to make actual custom player controlled characters :man_facepalming:

I’ve used constraint based characters before, and my approach was to have an invisible character that would play the character animations and give the constraint character AlignOrientations that would make the constraint character match the pose of the animated invisible character. I’m not sure if I used AlignPositions as well to keep the character up as it’s been quite a while since I’ve used that system, and I don’t have the studio file for the system anymore, so AlignPositions may also need to be used if AlignOrientations don’t work on their own (you will also need to adjust some properties in the AlignConstraints to keep the character from jittering and spazzing out)

1 Like

I want constraint based player controlled characters

HingeConstraints do have ActuatorType and you can set them to Servo which uses TargetAngle. I’ve used those with great success before.

Looks like you’re using BallSocketConstraints in your gif there? I know BallSocketConstraints don’t have actuators but you should be able to combine the BallSocketConstraint with an AlignOrientation constraint to get the effect you want. You would change the rotation in the CFrame for one of the attachments (being careful to keep the offset the same) and AlignOrientation will rotate the part around that attachment to the target orientation.

Try playing around with those and see if you can get the effect that you want?

3 Likes