# Capsule Cast

[Physics 3D](../index.md) / [Physics](index.md) / **Capsule Cast** Point1, Point2, Radius, Direction, MaxDistance, LayerMask, QueryTriggerInteraction

## Description

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

## Parameters

| Name | Description |
| :--- | :---------- |
| Point 1 |  |
| Point 2 |  |
| Radius |  |
| Direction |  |
| 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("Capsule Cast")]
    [Category("Physics 3D/Physics/Capsule Cast", "Point1, Point2, Radius, Direction, MaxDistance, LayerMask, QueryTriggerInteraction")]
    [Description("Compares the Capsule Cast static method of Physics class to another value")]

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

    [Parameter("Point 1")]
    [Parameter("Point 2")]
    [Parameter("Radius")]
    [Parameter("Direction")]
    [Parameter("Max Distance")]
    [Parameter("Layer Mask")]
    [Parameter("Query Trigger Interaction")]

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

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

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

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

        [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("Capsule Cast");
            return $"{className} {method} ({this.m_Point1}, {this.m_Point2}, {this.m_Radius}, {this.m_Direction}, {this.m_MaxDistance}, {this.m_LayerMask}, {this.m_QueryTriggerInteraction})";
        }

        protected override bool Run(Args args)
        {
            bool value = Physics.CapsuleCast(
                (Vector3) this.m_Point1.Get(args),
                (Vector3) this.m_Point2.Get(args),
                (float) this.m_Radius.Get(args),
                (Vector3) this.m_Direction.Get(args),
                (float) this.m_MaxDistance.Get(args),
                (int) this.m_LayerMask.Get(args),
                this.m_QueryTriggerInteraction
            );

            return value;
        }
    }
}
```

