How is this done? I have 2 controllers, one tagged 'victim' the other 'player'
In scripts attached to the player controller the following fails: (and vice versa)
This does not work:
public void OnControllerColliderHit(ControllerColliderHit hit)
{
if (hit.controller.gameObject.tag == "victim")
{
//never gets here
}
if (hit.collider.tag == "victim")
{
//or here
}
}
Neither does this:
public void OnCollisionEnter(Collision collision)
{
// game logic never gets here
}
How do i detect this kind of thing?
Many thanks