Howdy folks,
I’m trying to get collision detection working on my game and I can’t figure this out for the life of me. I’ve read tons of forum posts regarding this and I don’t know what else to try… I attached a pic of what I’m working with, I basically just want to know when the robot hits the ball.
They’ve both got colliders and rigid bodies, and I can move the ball around with the robot just fine but I can’t detect when they hit.
Neither have “Is Trigger” selected… the robot has a capsule collider surrounding him and a rigidbody that is not kinematic.
The ball has a sphere collider and a rigidbody and is also is not kinematic.
Currently I have the script on the robot but I’ve also tried putting one on the ball… All I have in it right now is:
void OnCollisionEnter(Collision collision) {
Debug.Log ("BAM!");
}
I also tried setting both of them to triggers and using OnTriggerEnter but that didn’t help me either.
Anyone have any ideas what I might be doing wrong?