---
tags:
    - "Physics, 3D"
---

# Articulation Body Set Drive Target

[Physics 3D](../index.md) / [Articulation Body](index.md) / **Articulation Body Set Drive Target**

## Description

Executes the Set Drive Target method on the Articulation Body component

## Parameters

| Name | Description |
| :--- | :---------- |
| Axis |  |
| Value |  |

## 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("Articulation Body Set Drive Target")]
    [Category("Physics 3D/Articulation Body/Set Drive Target")]
    [Description("Executes the Set Drive Target method on the Articulation Body component")]
    
    [Image(typeof(IconPhysics), ColorTheme.Type.Lime, typeof(BadgeDot))]
    [Keywords("Physics, 3D")]
    
    [Parameter("Axis")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionArticulationBody_SetDriveTarget_2 : Instruction
    {
        [SerializeField] private GetGameObject m_ArticulationBody = new GetGameObject(
            new GenTypeGameObject_ArticulationBody()
        );
        
        [SerializeField] private ArticulationDriveAxis m_Axis = default;
        
        [SerializeField] private GetNumber m_Value = new GetNumber();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Drive Target");
            return $"{this.m_ArticulationBody} {method} ({this.m_Axis}, {this.m_Value})";
        }
        
        protected override Awaitable Run(Args args)
        {
            ArticulationBody component = this.m_ArticulationBody.Get<ArticulationBody>(args);
            if (component == null) return Done;
            
            component.SetDriveTarget(
                this.m_Axis,
                (float) this.m_Value.Get(args)
            );
            
            return Done;
        }
    }
}


```

