Not registering collision?

Hi,

I have a ball that falls off a platform and hits a cube under it call “FallPoint”, at which point I want the player to respawn at the starting point.

function OnControllerColliderHit(hit : ControllerColliderHit)
{
	
	if (hit.gameObject.Find == "FallPoint")
	{
		livesLeft --;
		Respawn();
		//Debug.Log("Hit");
	}
	
	
}

function Respawn()
{
	//Spawn point location
	transform.position = Vector3(1.2, 19.6, -2.4);
	
}

For some reason, the ball hits the fall point and then keeps going, not registering the collision. Any ideas as to what I’m doing wrong?

neither of the two has a rigidbody or you move them by changing the transform instead of using the rigidbody move functionality or you use mesh colliders which are not convex

Nope, both are rigidbody and have colliders. Here’s a pic:

Shouldn’t that be…

function OnControllerColliderHit(hit : ControllerColliderHit) 
{ 
    
   if (hit.gameObject.name == "FallPoint") 
   { 
      livesLeft --; 
      Respawn(); 
      //Debug.Log("Hit"); 
   } 
    
}

So instead you are checking against the name of the object the ControllerCollider collided with.[/quote]

I put in log statement, I get nothing back so the issue is no collision is measured.

function OnControllerColliderHit(hit : ControllerColliderHit)
{
	Debug.Log("Enter Hit");
	
	if (hit.gameObject.Find == "FallPoint")
	{
		livesLeft --;
		Respawn();
		Debug.Log("Hit");
	}
	
	
}

function Respawn()
{
	Debug.Log("Respawn");
	//Spawn point location
	transform.position = Vector3(1.2, 19.6, -2.4);
	
}

Should I use a trigger instead?