# Linecast

[Physics 3D](../index.md) / [Physics](index.md) / **Linecast** Start, End, LayerMask, QueryTriggerInteraction

## Description

Compares the Linecast static method of Physics class to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Start |  |
| End |  |
| 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("Linecast")]
    [Category("Physics 3D/Physics/Linecast", "Start, End, LayerMask, QueryTriggerInteraction")]
    [Description("Compares the Linecast static method of Physics class to another value")]

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

    [Parameter("Start")]
    [Parameter("End")]
    [Parameter("Layer Mask")]
    [Parameter("Query Trigger Interaction")]

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

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

        [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("Linecast");
            return $"{className} {method} ({this.m_Start}, {this.m_End}, {this.m_LayerMask}, {this.m_QueryTriggerInteraction})";
        }

        protected override bool Run(Args args)
        {
            bool value = Physics.Linecast(
                (Vector3) this.m_Start.Get(args),
                (Vector3) this.m_End.Get(args),
                (int) this.m_LayerMask.Get(args),
                this.m_QueryTriggerInteraction
            );

            return value;
        }
    }
}
```

