HingeConstraint not working for Cylinder Bank Vault

Hey, so I have a door system that uses HingeConstraints and it works perfectly (with normal parts).

Today I attempted to make a bank vault using the same HingeConstraint system I use with my doors but it doesnt work, is it because its a cylinder?

I cant think of any other reasons why it doesnt work because the doors work perfectly
image

Are there any other optimised alternatives to make a bank vault slowly open?
I dont want to make a loop for optimisation purposes :sob:

6 Likes

you can tween the hinge part instead (make sure only the vault hinge part is anchored, and everything else is unanchored)

3 Likes

This is probably even more complicated but, it sure looks good.

VaultDoorII.rbxm (13.8 KB)

1 Like

Yeah that does look very good but there are so many welds and the script creates so many welds, but why?

Also could you explain Motor6ds if you dont mind, I have never done anything with them before

1 Like

Yea, I found that in the tool box long ago and had to doctor it up a bit to work right.
If you move anything it’s broken. It needs some love for sure… I’m not using it other than to study how it’s working.

I could not find the original one to post a link.
Also there are so many in there, one of them has to be doing that the way you’re attempting.

2 Likes

Show us the script that controls the Servo of the HInge. Put 3 backticks (```) before and after you copy/paste it here so it formats properly.

Are any parts of the door anchored?
Do you have a weld between something in the door and an anchored Part. You can see welds in the workspace if you go to the Model tab, Constraints, View welds tool.
What’s the ServoMaxTorque value of the hinge?
Is the Hinge active? View it with hte Model tab, Constraints, View constraints tool. Select the HingeConstraint and see if 2 Parts have green outlines. If not your Attachment0 and Attachment1 properties aren’t set.
Select Attachment0 in the HingeConstraint Properties and then select DoorAtt. do the same with the Attachment1 Property and the FrameAtt.
Are any of the door Parts colliding with any Parts in the workspace? Go to Studio settings, Physics, and check the Are Contact Points Shown checkbox. It’ll highlight where moving parts are contacting each other.

2 Likes

Sup,

The frame part inside of the Main Door Part is anchored but it doesnt make a difference because it works for the other doors as well

I just went through all of these and I figured out the problem.

I am using CollectionService to organise all of the doors and I forgot to add a tag to the bank vault so thats my fault lol.

I appreciate that you typed out all of this and I am also sorry. I also appreciate all of the other replies as I learnt more about Moter6D’s due to @2112Jay.

So yeah, thanks again and sorry for the misunderstanding

1 Like

Got a slight problem though. When there are no parts around the cylinder, its perfect

However, when I put the cylinder inside of a part, it looks like this in studio:

But it looks like this in game when I test it:

Any solutions? Sorry, its my second time using HingeConstraints lol

1 Like

I’m guessing the hole is a Union?
Unions don’t always have the same physical shape as their visual shape. Your door may be hitting the Union. Try changing the CollisionFidelity Property of the Union to PreciseConvexDecompostion
to see if that helps.
There are 2 ways to check if the 2 parts are contacting each other:

  • There is a Studio setting in the Physics tab that has a checkbox for ShowDecompositionGeometry (there’s a plugin that makes this easier). You can check it to see what your Unions and Meshes look like physically compared to visually. You may have to change a property in the Union for a second to show it though. It could show that the Union doesn’t have a perfect hole in it.
  • Use the Are Contact Points Shown tool in the Studio settings I mentioned above. Red spheres will show the contact point between parts when they collide while testing. I have it on all the time since I do a lot of work with Constraints.
2 Likes

Yeah the hole is in the union

I changed the CollisiopnFidelity to PreciseConvexDecomposition but it still happens for some reason.

I also turned on “Are Contact Points Shown” in studio settings but nothing is showing

1 Like

When I press play in studio, it looks like this:
image

I guess its something to do with the HingeConstraint right? Because when I anchor it, it doesnt move weirdly. Should I weld it or will that interfere with the HingeConstraint?

Are your HingeConstraints Attachments in the same spot? If not they’ll offset to move them to the same spot.

Maybe post a model of the door, Union, and script so I can take a look.

1 Like

Yeah the attachments were the problem. Thank you :pray:

I was just about to say, it doesnt move how I expected it to move but its because the union was stopping it, so I just turned off CanCollide

Thanks again for the help

You can also use Collision groups for that.
Put them both the door and Union in the same Collision group (let’s say it’s called doors) and set doors to collide with Default, but not collide with doors.
If you do that and have issues with other Parts colliding you can just add those Parts into doors as well.

1 Like

Oh thats interesting, i’ve never messed around with CollisionGroups before.

How would I set doors to collide with Default?

Collision Filtering is your friend. When you set up Collision Groups they collide with everything in the workspace (the Default setting).
Make a second group for doors and their walls. Have all the other checkboxes on, but where the group is uncheck the box where it reacts with itself.
Select all the Parts you don’t want to collide with each other then click the + sign to add them to the group.

1 Like

Alright, Thank you very much :+1:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.