Is there anyway to get physics in a viewport frame

Basically I want a lootbox that drops down, unlocks then opens. In a viewport frame

I have created a lootbox that uses hingejoints to open the lid. The box is unanchored but welded together.

I know that I can’t make it drop down in a world model. So I’m going to manipulate the camera to make it look like it is.

But is there anyway I can get the hingejoints that open the box work. Or am I going to have to change it to using CFrames to animate it instead which will take ages and not look as good.

Btw I’ve not really worked with these alot. I’ve read a bit on WorldModels but still a bit confused with viewport frames so I apologise if this is a stupid question.

I think it’s as simple as putting a worldRoot in the viewportframe and then putting your box in that worldRoot

Never done it before but Ive heard that’s the solution

How do you create one because you cannot create one with Instance.new() Apparently.

Also what is the difference between WorldModel and WorldRoot

WorldRoot appears to be an abstract class. WorldModel is what they meant, and WorldModels do provide some physics features to ViewportFrames, but I’ve only really seen it work with animations. The WorldModel does not appear to provide physics supports to constraints, so you will need to take a CFrame approach.

World models are Worldroots made for viewports. It allows for physics and joints (To use for animation of course)

So if I wanted a Motor Hinge Joint to open like a door in a WorldModel. I’m assuming this wont work because its not an animation its physics.

Yea pretty sure it works like that. Kind of a bummer that we can’t use constraints in Viewports. Though Viewports aren’t made for high amounts of movement; They want you to use the camera more than they want you to move the parts inside.