public bool FindWorldBoundsHit(Ray ray, out GameObjectRayHit hit) { hit = null; foreach (var go in this.vBoundsObjects) { GameObjectRayHit myHit = null; if (MathUtil.FindGORayIntersection(ray, go, out myHit)) { if (hit == null || myHit.fHitDist < hit.fHitDist) { hit = myHit; } } } return(hit != null); }