I'm starting to learn unity . My current project simulates a dinner party; guests walk around randomly and when they hit another guest, they stop and chat for a while before wandering off. My problem is that the guests do not detect collisions with each other. They slide around each other, and continue on.
I'm using OnControllerColliderHit to detect collisions. This triggers when hitting the walls, but not another guest.
function OnControllerColliderHit (hit : ControllerColliderHit) {
if ((hit.gameObject.tag == "guest") && (isChatting == false)) {
isChatting = true;
}
else {
newHeading();
}
}
Have I made an error, or is there some aspect of the controller/engine/script I don't understand? Or, is there a better way to do this?
Thanks