pub struct ArticulationDrive {
pub damping: f32,
pub forceLimit: f32,
pub lowerLimit: f32,
pub stiffness: f32,
pub target: f32,
pub targetVelocity: f32,
pub upperLimit: f32,
pub driveType: Option<i32>,
}Expand description
ArticulationDrive is a sub class of the Unity engine since version 2020.1.0b1. Exert from Unity’s scripting documentation: 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.
Fields§
§damping: f32The damping of the spring attached to this drive.
forceLimit: f32The maximum force this drive can apply to a body.
lowerLimit: f32The lower limit of motion for a particular degree of freedom.
stiffness: f32The stiffness of the spring connected to this drive.
target: f32The target value the drive will try to reach.
targetVelocity: f32The velocity of the body this drive will try to reach.
upperLimit: f32The upper limit of motion for a particular degree of freedom.
driveType: Option<i32>Specifies which drive type to use for this drive. i32: (2022.2.0b1 - 2022.3.2f1)