-
-
Notifications
You must be signed in to change notification settings - Fork 10
physics.CreateDampenedSpringConstraint
Jérôme Leclercq edited this page Dec 8, 2020
·
1 revision
API: physics.CreateDampenedSpringConstraint
Creates a spring constraint between two entities.
physics.CreateDampenedSpringConstraint(first: Entity, second: Entity, firstAnchor: vec2, secondAnchor: vec2, restLength: number, stiffness: number, damping: number) -> constraint: DampedSpringConstraint
-
first: First entity of the constraint. -
second: Second entity of the constraint. -
firstAnchor: First entity position offset to attach the constraint to. -
secondAnchor: Second entity position offset to attach the constraint to. -
restLength: The distance the springs want to be. -
stiffness: Spring constant (see Young's modulus). -
damping: How soft to make the damping of the spring.
-
constraint: The newly created constraint.