public bool RayCollide(object userData, Shape shape) { //By default, cast userData as a shape, and then collide if the shapes would collide if (userData == null) return true; return ShouldCollide((Shape)userData, shape); }