Collision 'OR' Operator

I’ve been trying out some collision detection and here’s what I came up with. It’s easy to understand:

stop();
// New Function:
function myCollision() {
// If 1st circle hits the second or third circle:
    if (myCircleOne.hitTest(myCircleTwo or myCircleThree)) {
// Increment our hit counter:
        hits = hits + 1;
    }
}
// Run this function forever:
setInterval(myCollision, 0);

Why doesn’t this work? I tried or, I’ve tried | and also ||. None of these operators work. I’m trying to make it check if the first circle hits the second or third. How can this be done? BTW, what’s the difference between or, | and ||?

  • Thanks, Sharif :battery:.