Legacy Documentation: Version 4.6.2
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

WheelCollider.suspensionSpring

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

Sumbission failed

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

Close

Cancel

Switch to Manual
public var suspensionSpring: JointSpring;
public JointSpring suspensionSpring;
public suspensionSpring as JointSpring

Description

The parameters of wheel's suspension. The suspension attempts to reach a target position.

By adding spring and damping forces.

The /suspensionSpring.spring/ force attempts to reach the target position. A larger value makes the suspension reach the target position faster.

The /suspensionSpring.damper/ force dampens the suspension velocity. A larger value makes the suspension reach the goal slower.

The suspension tries to reach /suspensionSpring.targetPosition/, which is the rest length of the suspension along the suspensionDistance. Zero value maps to full extension along the suspension travel, a value of one maps to fully compressed suspension. Default value is zero, which matches the behavior of regular car's suspension.