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

Rigidbody Closest Point On Bounds#

Physics 3D / Rigidbody / Rigidbody Closest Point On Bounds

Description#

Compares the Closest Point On Bounds method of Rigidbody component to another value

Parameters#

Name Description
Rigidbody
Position
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("Rigidbody Closest Point On Bounds")]
    [Category("Physics 3D/Rigidbody/Closest Point On Bounds")]
    [Description("Compares the Closest Point On Bounds method of Rigidbody component to another value")]
    
    [Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
    [Keywords("Physics, 3D")]
    
    [Parameter("Rigidbody")]
    [Parameter("Position")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionVector3_Rigidbody_CheckClosestPointOnBounds_1 : Condition
    {
        [SerializeField] private GetGameObject m_Rigidbody = new GetGameObject(
            new GenTypeGameObject_Rigidbody()
        );
        
        [SerializeField] private GetVector3 m_Value = new GetVector3();
        
        [SerializeField] private GetVector3 m_Position = new GetVector3();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Closest Point On Bounds");
            string parameters = $"({this.m_Position})";
            return $"{this.m_Rigidbody} {method} = {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            Rigidbody component = this.m_Rigidbody.Get<Rigidbody>(args);
            if (component == null) return false;
            
            Vector3 value = component.ClosestPointOnBounds(
                (Vector3) this.m_Position.Get(args)
            );
            
            return value == (Vector3) this.m_Value.Get(args);
        }
    }
}

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