# MMotion.Punch

Create a punch around a starting value, with a float, Vector2 or Vector3 strength.

Namespace: MeatMotion

Assembly: MeatMotion

```csharp
public static class Punch
```

[Runtime/Adapters/Vibration/VibrationMotion.cs · L38](../../../source/Runtime/Adapters/Vibration/VibrationMotion.cs.html#L38)

## Return to the starting value

Add `using MeatMotion;`. The second argument is the strength. This punch returns to its starting value of 3 at the end of its one-second duration.

```csharp
float value = 0f;
using var world = new MotionWorld();
var punch = MMotion.Punch.Create(3f, 2f, 1f)
    .WithFrequency(5).WithDampingRatio(1f)
    .WithScheduler(world).Bind(v => value = v);
punch.Complete();
```

## Create

Create a punch around a starting value, with a float, Vector2 or Vector3 strength.

```csharp
public static MotionBuilder<float, PunchOptions, FloatPunchMotionAdapter> Create(float startValue, float strength, float duration)
```

Parameters and return value

- `startValue` (`float`) Starting value.
- `strength` (`float`) Oscillation strength relative to the starting value.
- `duration` (`float`) Duration in seconds.
- Returns: `MotionBuilder<float, PunchOptions, FloatPunchMotionAdapter>`

[Runtime/Adapters/Vibration/VibrationMotion.cs · L40](../../../source/Runtime/Adapters/Vibration/VibrationMotion.cs.html#L40)

```csharp
public static MotionBuilder<Vector2, PunchOptions, Vector2PunchMotionAdapter> Create(Vector2 startValue, Vector2 strength, float duration)
```

Parameters and return value

- `startValue` (`Vector2`) Starting value.
- `strength` (`Vector2`) Oscillation strength relative to the starting value.
- `duration` (`float`) Duration in seconds.
- Returns: `MotionBuilder<Vector2, PunchOptions, Vector2PunchMotionAdapter>`

[Runtime/Adapters/Vibration/VibrationMotion.cs · L43](../../../source/Runtime/Adapters/Vibration/VibrationMotion.cs.html#L43)

```csharp
public static MotionBuilder<Vector3, PunchOptions, Vector3PunchMotionAdapter> Create(Vector3 startValue, Vector3 strength, float duration)
```

Parameters and return value

- `startValue` (`Vector3`) Starting value.
- `strength` (`Vector3`) Oscillation strength relative to the starting value.
- `duration` (`float`) Duration in seconds.
- Returns: `MotionBuilder<Vector3, PunchOptions, Vector3PunchMotionAdapter>`

[Runtime/Adapters/Vibration/VibrationMotion.cs · L46](../../../source/Runtime/Adapters/Vibration/VibrationMotion.cs.html#L46)
