New Physics Class: RigidConstraint

Guys, do y’all realize how good this is? You could basically make a physically-accurate building with stress points easily in a physics demolition game. You can attach things that have strengths dynamically without having to code in a bunch of messy nonsense - This is just great!’

Not only that, but it basically looks like you don’t even need to cframe a model together anymore, rigid constraint is flexible enough just connecting it will poof it to where it needs to be instantly. That’s what we’ve been missing - an alignposition “rigid” was never enough. This is the compliance we wanted.

THanks blox devs fam

14 Likes

We plan to add opt-in automatic destruction. This means the RigidConstraint dynamically breaks based on force limits that you configure if you so choose.

This could be really useful for vehicle destruction without having to connect touch events for a ton of parts and comparing velocity of hits!

6 Likes

Very eager to see the next stage of development for the Rigid constraint available to developers asap :slight_smile:

1 Like

Same thing happened to me when I was trying to move it. Atleast I’m not the only person experiencing this bug

2 Likes

THANK YOU!

This simplifies so much! NO more will we have to do complex cframe math to attach objects to players using welds or motors. It is also incredibly helpful that these constraints use attachments as inputs, instead of full-on parts like weldconstraints did.

This update has allowed me to easily attach this lantern I made in both runtime and studio!

The RigidConstraint perfectly works alongside other constraints, such as the RopeConstraint I added connecting the branch to the lantern. During playtesting I couldn’t help but notice how perfectly the RigidConstraint kept the branch attached.

My only problem is the fact I have to edit the attachment orientation in order to change the position of the rigid parts. And when adjusting the orientation, it seems inverted.

Love it!

14 Likes

I’d like to use this feature, but it seems it still needs work. I encountered a similar issue before,

however this time I am using the roblox branch.

10 Likes

How does this compare to Welds or WeldConstraints? Curious to know if there’s any difference functionality wise as I switched to WeldConstraints after experiencing Welds occasionally breaking in my vehicle chassis system, although they only offered a minimal improvement if any.

4 Likes

woah this could be amazing, super usefull!

4 Likes

that’s a lot good physics class this feature but yes i agree with that suggestion lot of time with that simple for RigidConstraint

3 Likes

Thanks, this will be “fixed” mid next week.
Unfortunately the dragger’s behavior still won’t be excellent until we replumb some backend dragger code - this is planned for a bit later.

6 Likes

will you be able to select a model and make it attach everything with rigid constraints?

3 Likes

useful and very wanted feature, was rather annoying there was no weld-ish type constraint that actually used attachments.
just hoping if i attach characters to the rigid points they dont burst with resistance when the constraints broken alike with the existing alternatives
it would be useful if we can set attachment0 to be dominant/ignorant since situations like this are annoying where they conflict with eachother (and often fling into the void)
VhFfBO3XfJ

11 Likes

I’m betting this probably won’t actually happen in practice, most likely it’ll just be collision based (e.g. if something hits a part and applies enough force the constraint will break, but it probably won’t calculate things like stress)

However, you could calculate stress between two attachments yourself. You’d just want to calculate the weight of each part (force of gravity) which is object.Mass * workspace.Gravity, and then you can calculate the torque and force between both. This would be pretty expensive to do (A complexity of O(n^2)) but the cost of the calculation would likely be pretty cheap, likely a dot product and some multiplication for each “connection” and you would only need to do this once!

As long as your models aren’t too complex you could manage, but, if you wanted you could avoid parts altogether and only use some RigidConstraints in the model, which would greatly let you reduce the number of things to calculate for, and maybe even make your simulations look more realistic/satisfying (little tiny parts that are part of a bigger object aren’t going to spray everywhere and make a mess when that wouldn’t happen irl anyways)

I don’t know what the actual math would turn out to be, but, like I mentioned really you would only need to calculate it once with the Roblox feature, and then you can use those calculations to update the RigidConstraint’s breaking thresholds dynamically (default break force minus stress forces), so it works at runtime too!

(When breaking parts off you would also need to update the thresholds for those parts’ connections again, so something which would break very easily at the start doesn’t continue to break easily if a lot of weight is removed)

What’s especially cool is that doing these stress calculations like this isn’t even the hard part, the hard part is collisions, and calculating forces and things, because Roblox doesn’t offer many ways to do this accurately, and in some cases its not really clear what the proper calculations are.

This is getting me very excited, and is reminding me a lot of Red Faction Guerrilla’s destruction, but modernized. I definitely would love to play around with this idea when and if they release it!

3 Likes

I bet this happens due to the assembly root being changed, or something being recalculated in the assembly. Maybe if you set the root priority of the staff in your gif higher it may resolve this effect? (I guess shoot me a PM if you have anything further)

1 Like

I’d love to see more practical examples. With constraints for beginners they often find it to all the same. Practical examples and a .rblx file would be great

1 Like

This is not targeted to builders but to programmers. And it’s very useful!

2 Likes

Yes, this is correct but even more physics bugs will occur (in different areas) if I set the weapon to not be Massless, which conflicts with the priority table. Afaik I do not have the leeway for it.

3 Likes

This is a funny way to weld things together, I can’t wait to see what I can use this for. I love playing with physics and constraints.

2 Likes

Really? Because I’m a scripter and I barely understand this.

I mean just look my display name :eyes:

1 Like

This is amazing. I can imagine setting up a skeleton frame and creating modular rooms with ease. It’s like better welds.

1 Like