void OnCollisionEnter(Collision collision)
{
Debug.Log("Player has collided with an object");
Die();
}
void Die()
{
SceneManager.LoadScene("Main");
}
1tuy1e
There’s a snippet of the code, and a video of the problem. I have a player with a rigidbody and a box collider, and objects for the player to collide with (which also have rigidbodies and box colliders). For some reason when the player collides with the objects, OnCollisionEnter is not called. I thought this would be a simple issue to solve but for the life of me I can’t find any solution.
Any help is appreciated ![]()