I am trying to make doors in VR. Needless to say, very small numbers of tutorials “out there”. But, they all have something in common: They completely disregard physics and move on to make their own “fake” physics simulation.
That results in the door being able to move as long as we hold it. You can’t pull/push while grabbing and let go and then see the door open or close all the way. This is all the best these tutorials have to show. Is there a way to use physics with doors and cabinets in VR? If not, why? Job Simulator has doors that react to pulling/pushing and letting go, Walking Dead Saints and Sinners (made with Unreal) also.
Why can’t we grab physics objects? There is one tutorial where a physics door is opened by pushing, but not grabbing. Please help me figure this out!
So, I run so test, and all you need is a door that is attached to some frame, that acts as a point of rotation, with physics constraint. Look at this tutorial. Then just change a few settings on the constraint. I didn’t use an angular motor, the linear limit was set to limited (not locked) and contact distance with restitution set to 1. Without it, you can bend the door down when you are not pushing straight on in. You can set it up as you like. The video shows you the basics. When you want to pull you can use collision of the handle to pull or use another physics constraint and connect the door with your hand.
Sorry that it took a while. I am preparing for high school exams.
Here is a screenshot with all the changed variables in the physics constraint. Don’t forget to turn on the physics simulation on the door piece and add collision with the proper setup of the channel to your VR controllers. It is important to set the tolerance to zero otherwise you can push from the top of the doors or use friction and push the doors down which is unnatural. If you want your doors to swing less or return to posïtion you can follow the tutorial.