protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1) { position = position + (rotation * ((this.worldRotation * this.center) + this.worldPosition)); if (DeployVolume.CheckCapsule(position + ((((rotation * this.worldRotation) * Vector3.up) * this.height) * 0.5f), position + ((((rotation * this.worldRotation) * Vector3.down) * this.height) * 0.5f), this.radius, this.layers & mask, this.ignore)) { return(true); } return(false); }
protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1) { position += rotation * (worldRotation * center + worldPosition); Vector3 start = position + rotation * worldRotation * Vector3.up * height * 0.5f; Vector3 end = position + rotation * worldRotation * Vector3.down * height * 0.5f; if (DeployVolume.CheckCapsule(start, end, radius, (int)layers & mask, this)) { return(true); } return(false); }
protected override bool Check(Vector3 position, Quaternion rotation, int mask = -1) { position = Vector3.op_Addition(position, Quaternion.op_Multiply(rotation, Vector3.op_Addition(Quaternion.op_Multiply(this.worldRotation, this.center), this.worldPosition))); return(DeployVolume.CheckCapsule(Vector3.op_Addition(position, Vector3.op_Multiply(Vector3.op_Multiply(Quaternion.op_Multiply(Quaternion.op_Multiply(rotation, this.worldRotation), Vector3.get_up()), this.height), 0.5f)), Vector3.op_Addition(position, Vector3.op_Multiply(Vector3.op_Multiply(Quaternion.op_Multiply(Quaternion.op_Multiply(rotation, this.worldRotation), Vector3.get_down()), this.height), 0.5f)), this.radius, LayerMask.op_Implicit(this.layers) & mask, this.ignore)); }