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 Add Force At Position#

Physics 3D / Rigidbody / Rigidbody Add Force At Position Force, Position, Mode

Description#

Executes the Add Force At Position method on the Rigidbody component

Parameters#

Name Description
Force
Position
Mode

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 Add Force At Position")]
    [Category("Physics 3D/Rigidbody/Add Force At Position", "Force, Position, Mode")]
    [Description("Executes the Add Force At Position method on the Rigidbody component")]
    
    [Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
    [Keywords("Physics, 3D")]
    
    [Parameter("Force")]
    [Parameter("Position")]
    [Parameter("Mode")]
    
    [Serializable]
    public class GenInstructionRigidbody_AddForceAtPosition_3_Vector3Force_Vector3Position_ForceModeMode : Instruction
    {
        [SerializeField] private GetGameObject m_Rigidbody = new GetGameObject(
            new GenTypeGameObject_Rigidbody()
        );
        
        [SerializeField] private GetVector3 m_Force = new GetVector3();
        
        [SerializeField] private GetVector3 m_Position = new GetVector3();
        
        [SerializeField] private ForceMode m_Mode = default;
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Add Force At Position");
            return $"{this.m_Rigidbody} {method} ({this.m_Force}, {this.m_Position}, {this.m_Mode})";
        }
        
        protected override Awaitable Run(Args args)
        {
            Rigidbody component = this.m_Rigidbody.Get<Rigidbody>(args);
            if (component == null) return Done;
            
            component.AddForceAtPosition(
                (Vector3) this.m_Force.Get(args),
                (Vector3) this.m_Position.Get(args),
                this.m_Mode
            );
            
            return Done;
        }
    }
}

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