VR with collision triggers help

I am working on getting triggers to work in VR at the moment and they are working when i use keyboard controls to move through the trigger, but in VR they are not firing when i pass through or stand in it. The triggers are set to ‘triggerenter’. I am using the HTC Vive and the “Quick start to making experiences on the HTC Vive.” project forked.

From what i under stand that the Camera has turned off collision. or collision will not work with the headset moving? How would i add i collision to it? could i wright a script to start add collision to the camera as the last script to load?

Dose anyone have any solutions to this or come across it before?
Any other ideas as to what might be going on?

Any help or suggestions would be greatly appreciated.

Thanks - DylanK

Without seeing the project, it’s difficult to tell.

How are you moving the camera using the keyboard? Teleport? Forces? SetPosition etc?

Here is a link to the project if that helps.


It’s a complicated project so I’m guessing at the issue.

You are currently using the first person movement script to move the character via keyboard right? This applies forces to the rigid body which moves the player and the camera is a child entity of the player?

If this is correct, than the HMD in VR is just moving the camera without the parent player object and therefore without the rigidbody. This is where it gets a little tricky as you can’t attach a rigid body to the camera due to the way that the physics simulation works.

You might be able to attach a collision component only but I can’t remember if that fires the the trigger event when it enters another trigger.

1 Like

Sorry, I’m very bad at explaining myself, yes you’ve hit it on the head. Yea I think it needs to be a rigid body to fire the trigger. So could I add a rigid body as a child of the camera? would that work or could I write a script so say a rigid body follows the camera position to set off the trigger?