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 / Closest Point

  • Can Read

  • Cannot Write

Description#

Returns the execution of Closest Point static method on the Physics class

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
{
    [Get]
    
    [Title("Closest Point")]
    [Category("Physics/Closest Point")]
    [Description("Returns the execution of Closest Point static method on the Physics class")]
    
    [Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
    
    [Serializable]
    public class GenTypeVector3_Physics_ClosestPoint_4 : TypeVector3
    {
        [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();
        
        public override Vector3 Get(Args args)
        {
            Vector3 value = (Vector3) 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;
        }
        
        public override string ToString()
        {
            return $"Physics Closest Point ({this.m_Point}, {this.m_Collider}, {this.m_Position}, {this.m_Rotation})";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.