Odd Physics Problem (Resolved)

I am working on a dealership, and my door works fine, but when it is in this glass wall, it doesn’t… Ideas?

4 Likes

I’m pretty sure you’ve used a Union for the glass wall.
Unions and MeshParts aren’t the same shape physically as they are visually. Cutting small areas out of large Parts usually makes the opening smaller than it actually should be.
You can check this out by doing the following:
Go to your Studio settings, and go to File > Studio Settings
Choose Studio and go down to Visualization and click on Show Decomposition Geometry. This will show you the actual physical shape of Unions and Meshparts. You can click on the Union and in the Properties switch the CollisionFidelity to PreciseConvexDecomposition.

In the settings you can also choose Physics & click on the AreContactPointsShown. This will show a red ball where 2 Parts are colliding. I’m guessing it’ll give you that when you try to move the door into the wall.

On another note, IRL a glass wall would be cut into sections. Cutting sharp sections out of glass creates corners that would crack very easily. Have a look at images of glass walls online to see what I mean.

3 Likes

Very helpful!

One thing though, because im not unioning it, I get this… ideas?

3 Likes

Also, why arnt these doors working? They aren’t unions…

1 Like

I mentioned not using a complete union in my last post. Real glass walls aren’t one piece. Look at online images and you’ll see that.

Did using PreciseConvexDecomposition for your Union make a difference?

Use AreContactPointsShown. I can tell you didn’t try it because there are no red spheres showing in your video.

If you have to have a one Union Glass wall (and PreciseConvexDecomposition didn’t work) then make the Union, but make it CanCollide off so it’s visually appealing. Then use Transparent CanCollide Parts around the door to build the solid section of the wall.

What are you using to return your door to the closed Position?

  • the HingeConstraint settings?
  • a TorsionSpring constraint?
  • an AlignOrientation constraint?

Only the door is a union. And I did use the PreciseConvexDecomposition, which fixed the door for the glass. But not the other, because it is not a union.

And what do you mean by AreContactPointsShown?

And I am using a spring to close the door…

1 Like

My first post mentions where you can find the AreContactPointsShown tool…
Take a screenshot of your door with the Show Constraints tool (in the Constraints section of the Model tab in Studio) on so I can see how your Hinge and Spring are set up. Have the Spring selected so I can see its Properties too.

1 Like

1 Like

I think it’s a leverage issue. Because your springs are so close to the pivot they don’t allow enough of an angle to push the door to a central angle.

Try deleting both of those springs and using one TorsionSpringConstraint at the hinge line between the 2 hinge Attachments.

1 Like

So how do I use it?


Best way is to Play test it.
Try walking through it. If it’s stiff set the MaxTorque, Stiffness, and Damping so it looks and feels right.
You can click LimitsEnabled to set the max angle it is allowed to travel in either direction.

That and you can look at the link I sent which has the exact explanation of how to make it work.

1 Like

Maybe it’s the hitboxes? charchar

1 Like

Yeah, but how do I rotate it???

image
like this

1 Like

You don’t need to rotate it. If the Attachments are aligned then the spring is at its central angle. It will try to reach this aligned position. Since your door was springing both ways when you walked through it I guessed you want it to do that.
Like I said, try it out in test mode and try to walk through it and have your Show Constraints tool on. This will show it rotating when you walk through the door. Experiment with the values in the Properties until the door feels right when your avatar pushes through.

1 Like

Yeah, I get that but like how can I align this???

image
image
Do you have like a model?

1 Like

What do you mean by ‘how do I align this’?
Select both of your Attachments for the Hinge. The yellow arrows and the orange arrows should point in the same directions. If you do that the TorsionSpring should be aligned correctly.

When the door is closed the spring coil should be just a ring. Depending on which way you have the orange arrows pointing the spring ring should be flat like in your picture 2 posts up. It may not be aligned flat with the door, but that shouldn’t be a problem.

When the door opens you should see the spring open up into a curved shape like in the picture in the post right above this one. You need to go through your settings for the TorsionSpring and adjust the values so it operates properly.

If you want to you can post your model here and I’ll have a look at it.

1 Like

Here is my model. I am just unsure…

here is my asset, lmk if you can help

1 Like

Your TorsionSpringConstraint Attachment0 isn’t set to anything.
Your HIngeConstraint Attachment1 isn’t set to anything either.
You have 3 Attachments in your door, 2 in the same spot, and 1 on the other side.

Your Parts and Unions are very weird sizes, and the door is larger than the opening which causes it to get stuck in the frame.

I’m guessing you haven’t used a set Move increment in your Model tab Snap To Grid settings. You’ll find it much easier to create if you use a .1 stud increment, or whatever size works for you. This allows Parts to fit against each other much better while building.

Your frame was a Union of 9 different Parts, which is strange because it didn’t have any details in it that needed that many Parts. You could have made a simple frame with 3 Parts that would work wayyyy better.

I have no idea what that script was supposed to do so I deleted it. All the settings of the TorsionSpring are set so it works properly. You can experiment with the Properties to see what each one does.
Also, when testing, give Studio a few seconds to load physics in properly. If you test and try walking through the door immediately it’ll probably stick a little bit.

I also made the 2 side frames with BlockMeshes in them so the door corners didn’t get stuck in them when it swung by.

Kanye_North door.rbxm (27.2 KB)

2 Likes

I can’t explain how thankful I am… Thank you so much!

1 Like

One more thing, its kina bugging. I cant move it

1 Like