public override void OnConnect(VisibilityZoneShape otherZone, PortalShape viaPortal) { base.OnConnect(otherZone, viaPortal); // increase the max z value so connected zones are completely inside, but not for terrain zones if (otherZone is TerrainVisibilityZoneShape) { return; } float fMaxZ = otherZone.FinalBoundingBox.vMax.Z; Vector3F pt = this.FinalBoundingBox.Center; pt.Z = fMaxZ; this.FinalBoundingBox.AddPoint(pt); }
public override void OnConnect(VisibilityZoneShape otherZone, PortalShape viaPortal) { base.OnConnect(otherZone, viaPortal); // increase the max z value so connected zones are completely inside, but not for terrain zones if (otherZone is TerrainVisibilityZoneShape) return; float fMaxZ = otherZone.FinalBoundingBox.vMax.Z; Vector3F pt = this.FinalBoundingBox.Center; pt.Z = fMaxZ; this.FinalBoundingBox.AddPoint(pt); }