# Sandbox.Physics.PhysicsJoint.CreateSpring

```csharp
static SpringJoint CreateSpring(PhysicsPoint a, PhysicsPoint b, float minLength, float maxLength)
```

Creates a constraint that will try to stay the same length, like a spring, or a rod.

### Parameters

- `a` (`PhysicsPoint`)
- `b` (`PhysicsPoint`)
- `minLength` (`float`)
- `maxLength` (`float`)

### Returns

`SpringJoint`

Declared in [Sandbox.Physics.PhysicsJoint](/api/Sandbox.Physics.PhysicsJoint).
Assembly: `Sandbox.Engine`.
