Why does this raycast keep hitting itself?

I’m using a script from the wiki which i’ve slightly modified only to add a debug message. The purpose of it is supposed to prevent objects passing through walls at high speeds (because continuous collision detection is broken). The script is here: Paste All -Art, Craft, Design, Drawing & Photography Guide

I’ve attached it to a cannonball. Here is a shot of it, and the inspector.

Important things to note here:

  1. The cannonball is on layer ProjectilesFriendly
  2. In the don’t go through things script, Projectilesfriendly is set as the layer mask
  3. the cannonball has no children or parents, its a lone object.

alt text

And finally, here’s my Physics section of the project settings:

alt text

What’s important to note here is that the ProjectilesFriendly layer doesn’t collide with itself.

So i’m confused, why wont this work ?

Also i have no idea what went wrong with embedding images in this post. Please click the links to see them

I will say:

In the LayerMask field, place the layer of the object you dont want to go through; i.e the object you want to hit. The statement in the script comments is misleading and threw me off at first.