# Box Cast

[Physics 3D](../index.md) / [Physics](index.md) / **Box Cast** Center, HalfExtents, Direction, Orientation, MaxDistance, LayerMask, QueryTriggerInteraction

## Description

Compares the Box Cast static method of Physics class to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Center |  |
| Half Extents |  |
| Direction |  |
| Orientation |  |
| Max Distance |  |
| Layer Mask |  |
| Query Trigger Interaction |  |

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Box Cast")]
    [Category("Physics 3D/Physics/Box Cast", "Center, HalfExtents, Direction, Orientation, MaxDistance, LayerMask, QueryTriggerInteraction")]
    [Description("Compares the Box Cast static method of Physics class to another value")]

    [Image(typeof(IconPhysics), ColorTheme.Type.Lime)]

    [Parameter("Center")]
    [Parameter("Half Extents")]
    [Parameter("Direction")]
    [Parameter("Orientation")]
    [Parameter("Max Distance")]
    [Parameter("Layer Mask")]
    [Parameter("Query Trigger Interaction")]

    [Serializable]
    public class GenConditionBool_Physics_CheckBoxCast_7_Vector3Center_Vector3HalfExtents_Vector3Direction_QuaternionOrientation_FloatMaxDistance_IntLayerMask_QueryTriggerInteractionQueryTriggerInteraction : Condition
    {
        [SerializeField] private GetVector3 m_Center = new GetVector3();

        [SerializeField] private GetVector3 m_HalfExtents = new GetVector3();

        [SerializeField] private GetVector3 m_Direction = new GetVector3();

        [SerializeField] private GetQuaternion m_Orientation = new GetQuaternion();

        [SerializeField] private GetNumber m_MaxDistance = new GetNumber();

        [SerializeField] private GetInteger m_LayerMask = new GetInteger();

        [SerializeField] private QueryTriggerInteraction m_QueryTriggerInteraction = default;

        protected override string GetTitle(GameObject source)
        {
            string className = TextUtils.ThemeAsKeyword("Physics");
            string method = TextUtils.ThemeAsKeyword("Box Cast");
            return $"{className} {method} ({this.m_Center}, {this.m_HalfExtents}, {this.m_Direction}, {this.m_Orientation}, {this.m_MaxDistance}, {this.m_LayerMask}, {this.m_QueryTriggerInteraction})";
        }

        protected override bool Run(Args args)
        {
            bool value = Physics.BoxCast(
                (Vector3) this.m_Center.Get(args),
                (Vector3) this.m_HalfExtents.Get(args),
                (Vector3) this.m_Direction.Get(args),
                (Quaternion) this.m_Orientation.Get(args),
                (float) this.m_MaxDistance.Get(args),
                (int) this.m_LayerMask.Get(args),
                this.m_QueryTriggerInteraction
            );

            return value;
        }
    }
}
```

