# Vector2.SpringDamp

## Overload 1

```csharp
static Vector2 SpringDamp(in Vector2 current, in Vector2 target, ref Vector2 velocity, float deltaTime, float frequency = 2, float damping = 0.5)
```

Springly move towards the target vector

### Parameters

- `in current` (`Vector2`)
- `in target` (`Vector2`)
- `ref velocity` (`Vector2`)
- `deltaTime` (`float`)
- `frequency` (`float`), default `2`
- `damping` (`float`), default `0.5`

### Returns

`Vector2`

## Overload 2

```csharp
static Vector2 SpringDamp(in Vector2 current, in Vector2 target, ref Vector2 velocity, float smoothTime, float deltaTime, float frequency = 2, float damping = 0.5)
```

> **Obsolete.** Use the overload without the 'smoothTime' parameter instead, as it is no longer needed.

### Parameters

- `in current` (`Vector2`)
- `in target` (`Vector2`)
- `ref velocity` (`Vector2`)
- `smoothTime` (`float`)
- `deltaTime` (`float`)
- `frequency` (`float`), default `2`
- `damping` (`float`), default `0.5`

### Returns

`Vector2`

Declared in [Vector2](/api/Vector2).
Assembly: `Sandbox.System`.
