示例#1
0
        public static bool CheckBox <T>(ref T target, float3 center, quaternion orientation, float3 halfExtents, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
            where T : struct, ICollidable
        {
            var collector = new AnyHitCollector <DistanceHit>(0.0f);

            return(target.OverlapBoxCustom(center, orientation, halfExtents, ref collector, filter, queryInteraction));
        }
示例#2
0
        public static bool CheckCapsule <T>(ref T target, float3 point1, float3 point2, float radius, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
            where T : struct, ICollidable
        {
            var collector = new AnyHitCollector <DistanceHit>(0.0f);

            return(target.OverlapCapsuleCustom(point1, point2, radius, ref collector, filter, queryInteraction));
        }
示例#3
0
        public static bool RayCast <T>(ref T target, RaycastInput input) where T : struct, ICollidable
        {
            var collector = new AnyHitCollector <RaycastHit>(1.0f);

            return(target.CastRay(input, ref collector));
        }
示例#4
0
        public static bool CalculateDistance <T>(ref T target, ColliderDistanceInput input) where T : struct, ICollidable
        {
            var collector = new AnyHitCollector <DistanceHit>(input.MaxDistance);

            return(target.CalculateDistance(input, ref collector));
        }