public virtual bool IsSeatClipping(BaseMountable mountable, int mask = 1218511105) { if (mountable == null) { return(false); } Vector3 vector3 = mountable.transform.position; Vector3 vector31 = mountable.eyeOverride.transform.position; Vector3 vector32 = vector3 + (base.transform.up * 0.15f); return(GamePhysics.CheckCapsule(vector31, vector32, 0.1f, mask, QueryTriggerInteraction.UseGlobal)); }
public virtual bool IsSeatClipping(BaseMountable mountable, int mask = 1218511105) { if (Object.op_Equality((Object)mountable, (Object)null)) { return(false); } Vector3 position1 = ((Component)mountable).get_transform().get_position(); Vector3 position2 = ((Component)mountable.eyeOverride).get_transform().get_position(); Vector3 vector3 = Vector3.op_Multiply(((Component)this).get_transform().get_up(), 0.15f); Vector3 end = Vector3.op_Addition(position1, vector3); return(GamePhysics.CheckCapsule(position2, end, 0.1f, mask, (QueryTriggerInteraction)0)); }
public static bool CheckCapsule(Vector3 start, Vector3 end, float radius, int layerMask, ColliderInfo.Flags ignore) { if ((int)ignore == 0) { return(GamePhysics.CheckCapsule(start, end, radius, layerMask, QueryTriggerInteraction.UseGlobal)); } List <Collider> list = Pool.GetList <Collider>(); GamePhysics.OverlapCapsule(start, end, radius, list, layerMask, QueryTriggerInteraction.Ignore); bool flag = DeployVolume.CheckFlags(list, ignore); Pool.FreeList <Collider>(ref list); return(flag); }
public static bool CheckCapsule( Vector3 start, Vector3 end, float radius, int layerMask, ColliderInfo.Flags ignore) { if (ignore == (ColliderInfo.Flags) 0) { return(GamePhysics.CheckCapsule(start, end, radius, layerMask, (QueryTriggerInteraction)0)); } List <Collider> list = (List <Collider>)Pool.GetList <Collider>(); GamePhysics.OverlapCapsule(start, end, radius, list, layerMask, (QueryTriggerInteraction)1); int num = DeployVolume.CheckFlags(list, ignore) ? 1 : 0; // ISSUE: cast to a reference type Pool.FreeList <Collider>((List <M0>&) ref list); return(num != 0); }
public virtual bool IsSeatClipping(BaseMountable mountable, int mask = 1218511105) { if (!doClippingAndVisChecks) { return(false); } if (mountable == null) { return(false); } Vector3 position = mountable.transform.position; Vector3 position2 = mountable.eyeOverride.transform.position; Vector3 vector = position2 - position; float num = 0.4f; if (mountable.modifiesPlayerCollider) { num = Mathf.Min(num, mountable.customPlayerCollider.radius); } Vector3 start = position2 - vector * num; Vector3 end = position + vector * (num + 0.05f); return(GamePhysics.CheckCapsule(start, end, num, mask)); }