struct Spring

Controls spring parameters for a physics joint limits.

If a limit is soft (body bounces back due to restition when the limit is reached) the spring will pull the body back towards the limit using the specified parameters.

Public

Constructors

Spring

Spring()

Constructs a spring with no force.

Spring

Spring(float stiffness, float damping)

Constructs a spring.

stiffness
Spring strength. Force proportional to the position error.
damping
Damping strength. Force propertional to the velocity error.

Fields

Stiffness

float Stiffness

Spring strength.

Force proportional to the position error.

Damping

float Damping

Damping strength.

Force propertional to the velocity error.

Operators

operator==

bool operator==(const Spring &other) const