I’m struggling to get Unity’s collision system working, and having trouble understanding it. The way I have it, I have two GameObjects, both with colliders, and one with a rigidbody (called the “Enemy”). Now, in the game I detect whether a key has been pressed and use it to iTween rotate the other object, without the rigidbody (called the “Weapon”). But there’s a problem–on both the objects I’ve tried to use an OnCollisonEnter function. Later, I’m going to use this to send messages, but for now, it’s just supposed to print that a collision has occurred.
When the two objects collide, nothing prints. The Enemy prints when it touches the ground after spawning, but the Weapon never prints anything. Do both objects have to be rigidbodies? Is there any other, simpler way of detecting collisions between a melee weapon and a character?