I have random blocks constantly coming towards the character and trying to set up something so when the blocks hit the character, character dies.
function OnControllerColliderHit(hit : ControllerColliderHit)
{
if(hit.gameObject.tag == "blocks")
{
dead = true;
HealthControl.LIVES -= 1;
}
}
For some reason, this only works when the character is moving. When the character stays still, and the block hits it, nothing happens.
Any ideas? Thanks in advance.
The cubes would still have to send the message via collision logic though, I think thats what Marowi is referring to (he needs to flip the collision logic onto the cubes and not the player).
– PrimeDerektive