Version: 2022.2
LanguageEnglish
  • C#

ArticulationDrive

struct in UnityEngine

/

Implemented in:UnityEngine.PhysicsModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Drive applies forces and torques to the connected bodies.

Drive moves the body along one degree of freedom, be it a linear motion along a particular axis or a rotational motion around a particular axis. The drive will apply force to the body that is calculated from the current value of the drive, using this formula: F = stiffness * (currentPosition - target) - damping * (currentVelocity - targetVelocity). In this formula, currentPosition and currentVelocity are linear position and linear velocity in case of the linear drive. In case of the rotational drive, currentPosition and currentVelocity correspond to the angle and angular velocity respectively.

Properties

dampingThe damping of the spring attached to this drive.
driveTypeSpecifies which drive type to use for this drive.
forceLimitThe maximum force this drive can apply to a body.
lowerLimitThe lower limit of motion for a particular degree of freedom.
stiffnessThe stiffness of the spring connected to this drive.
targetThe target value the drive will try to reach.
targetVelocityThe velocity of the body this drive will try to reach.
upperLimitThe upper limit of motion for a particular degree of freedom.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961