public override bool Raycast(Ray ray, out Octave3DColliderRayHit colliderRayHit) { colliderRayHit = null; float t; if (_orientedBox.Raycast(ray, out t)) { Vector3 hitPoint = ray.GetPoint(t); BoxFace faceWhichContainsHitPoint = _orientedBox.GetBoxFaceClosestToPoint(hitPoint); Vector3 hitNormal = _orientedBox.GetBoxFacePlane(faceWhichContainsHitPoint).normal; colliderRayHit = new Octave3DColliderRayHit(ray, t, hitPoint, hitNormal, this); } return(colliderRayHit != null); }