VR Door Physics Axis Constraints

I have Blueprint with Mesh Door and PhysicsConstraint.

Door:

294065-1.png

PhysicsConstraint:

294066-2.png

294067-3.png

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?