I am trying to detect the player falling from a platform. I have
void OnCollisionEnter(Collision collisionInfo)
{
if (t.position.y < 0)
{
FindObjectOfType().EndGame();
}
}
where t represents the transform of the OVRPlayerController. Can anyone tell why this is not working and can tell me a solution?
Fixed: I just moved it to the update method.