Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Closest Point#

Physics 3D / Physics / Closest Point

Description#

Compares the Closest Point static method of Physics class to another value

Parameters#

Name Description
Point
Collider
Position
Rotation
Value

Code#

// <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("Closest Point")]
    [Category("Physics 3D/Physics/Closest Point")]
    [Description("Compares the Closest Point static method of Physics class to another value")]

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

    [Parameter("Point")]
    [Parameter("Collider")]
    [Parameter("Position")]
    [Parameter("Rotation")]
    [Parameter("Value")]

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

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

        [SerializeField] private GetGameObject m_Collider = new GetGameObject();

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

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

        protected override string GetTitle(GameObject source)
        {
            string className = TextUtils.ThemeAsKeyword("Physics");
            string method = TextUtils.ThemeAsKeyword("Closest Point");
            return $"{className} {method} ({this.m_Point}, {this.m_Collider}, {this.m_Position}, {this.m_Rotation}) = {this.m_Value}";
        }

        protected override bool Run(Args args)
        {
            Vector3 value = Physics.ClosestPoint(
                (Vector3) this.m_Point.Get(args),
                (Collider) this.m_Collider.Get<Collider>(args),
                (Vector3) this.m_Position.Get(args),
                (Quaternion) this.m_Rotation.Get(args)
            );

            return value == (Vector3) this.m_Value.Get(args);
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.