UnityEngine.Physics2D.RaycastAll(UnityEngine.Vector2, UnityEngine.Vector2)

Here are the examples of the csharp api UnityEngine.Physics2D.RaycastAll(UnityEngine.Vector2, UnityEngine.Vector2) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : Physics2DCast.cs
License : GNU General Public License v3.0
Project Creator : thiagosoara

public override void OnEnter()
        {
            var col = collection.Value;

            if (col != null)
            {
                RaycastHit2D[] rereplaced = null;

                switch (castType)
                {
                    case CastType.Box:
                        rereplaced = Physics2D.BoxCastAll(position1.Value, shapeSize.Value, shapeAngle.Value, direction.Value, maxDistance.Value, layerMask.value, minDepth.Value, maxDepth.Value);
                        break;

                    case CastType.Capsule:
                        rereplaced = Physics2D.CapsuleCastAll(position1.Value, shapeSize.Value, capsuleDirection, shapeAngle.Value, direction.Value, maxDistance.Value, layerMask.value, minDepth.Value, maxDepth.Value);
                        break;

                    case CastType.Circle:
                        rereplaced = Physics2D.CircleCastAll(position1.Value, radius.Value, direction.Value, maxDistance.Value, layerMask.value, minDepth.Value, maxDepth.Value);
                        break;

                    case CastType.Line:
                        rereplaced = Physics2D.LinecastAll(position1.Value, lineEnd.Value, layerMask.value, minDepth.Value, maxDepth.Value);
                        break;

                    case CastType.Ray:
                        rereplaced = Physics2D.RaycastAll(position1.Value, direction.Value, maxDistance.Value, layerMask.value, minDepth.Value, maxDepth.Value);
                        break;

                    default:
                    break;
                }

                PutCollidersIntoGameObjectCollection(rereplaced);
            }

            Continue();
        }