OnTriggerExit in VR

Hi,
I have sort of a platform game in VR, with a bridge and a big platform attached to it, where the player starts the game. Both the platform and the bridge have colliders, but no rigidbodies. As child to my camera rig (XR Rig), I have both controllers, the camera, and a capsule to symbolize the form of the body. The capsule has a collider, but no rigidbody (I have tried adding a rigidbody and the capsule just rolled/toppled and fell through everything). My Rig has both a collider and a rigidbody, with appropriate mass and drag.

What I am trying to do is to make my player go up again (“respawn”) if it falls off the bridge. I don’t want it to start the game again, just to regain the position it had before it fell off the bridge. I have tried to do that with a landing area and a “OnTriggerEnter” script, but that didn’t work very well. I’ve tried with “OnTriggerExit” applied to the bridge itself, but it doesn’t work either.

Am I making a logical mistake here? Is there something I must opt-in or -out that I might have forgotten?

Thanks!

Hi,

I think the first step for you is to find out which parts of the code is running, and what are the target values for re entering the platform, and so on.

Put some Debug.Log lines in the code.

Does the OnTriggerExit fires (when leaving the platform), or OnTriggerEnter (when falling to a landing area), at all. Or does they fire multiple times, perhaps interfering with an already ongoing return to the platform.