Open Box/Chest physics issue in VR

Hello!

I’m trying to make a simple box/chest that i want to open just like in real life. I´ve tried using a door-template and just rotate it to look like the top of the chest. The problem though is that the door is programmed to not be affected by gravity, and obviously the top of the chest needs to be affected by gravity if you just open it and release midway.

I´ve tried programming the effect of gravity (cant simply just use the gravity in the physics settings, because it’s not a physics object; it’s programmed to look like a physics object). But i havent managed to make it work 100% smooth, (it works soso, hard part is to make the top fall backwards or forwards smoothly when around 90 degrees).

So, does anyone know any good box/chest source code/template that i can dig into, or do you have any ideas of how to do it? (Maybe locking the position and rotation of some axis and treat it as a normal pickup object?)

Btw, the template I use is the Mitch VR template

Thankful for help!