VR Door Physics Axis Constraints

I have Blueprint with Mesh Door and PhysicsConstraint.






In door options only Z axis isn’t locked.
In PhysicsConstraint options Z axis is limited and XY axis locked, plus Angular motor to return door to original position.

In First Person and Third Person door works fine, but in VR constraints isn’t working right. Like hands in VR have infinante forse to push door out of it constrains.([VR Door Physics Axis Constraints - YouTube][4])

The vr hand HAS infinite force thats why your door is broken like that. I found out that using a Physics handle ON THE DOOR “helps” but doesn’t fix the issue.

The best way to implement a physics door in VR is… not to use any physics at all!

Basically you can have the door “track” the hand (motion controller) through an overlap of the grab sphere with the handle / door knob. When the overlap takes place, the door rotates on the hinges following the hand. When the overlap ends, the door stop following the hand, assuming the player has let go of the handle / door knob.

Instead of using an overlap you can adapt the grab mechanism of the standard VR template, but never actually attach the door to the hand, just have it follow it. I am using a similar technique for the second hand in my “two handed VR weapons tutorial” on YouTube: Two hands weapon handling in VR tutorial - Unreal Engine 4 - YouTube

If you really want to stick to physics, your best option is to use a physics handle to grab the door at the handle / door knob location, but you will spend some time fine tuning the physics handle parameters until it works as expected.

Tbh I allready founded a workaround for this problem, just forgot add an answer.

All I did is just instead of parenting hands to controller, I connected them with Rope Physics Constraint. So hand just gonna follow the controller, not stuck to it.

1 Like

Rope physic? Any chance you can share that code?

Hey there!
I’m trying to do this door system work it’s been a while now, I kinda did, but my door rotation always starts with a weird offset and also after getting to 90degrees it just inverts the rotation and keps rotating but now to the opposite direction.
How can I solve this?
My rotating objects I try to set to follow the motion controller always rotates weirdly, they never work.
I saw this tutorial https://www.youtube.com/watch?v=DqRnOC8rylc&t=1936s&ab_channel=VRPlayground
Where I tried exactly the same thing on UE 5.1, instead of creating an interface, I’m sending the motion controller data through the grab component which should be the same result. Somehow I doesn’t work.
It’s been like years I’m trying to create a door myself understanding how it works but there’s nowhere, no one explaining this. That’s incredibly frustrating. I’d really appreciate some help on it.