# Sandbox.Physics.SliderJoint.SetLinearMotor

```csharp
void SetLinearMotor(float targetVelocity, float maxForce)
```

Sets and enables a linear velocity motor, in units per second.

### Parameters

- `targetVelocity` (`float`)
- `maxForce` (`float`)

Declared in [Sandbox.Physics.SliderJoint](/api/Sandbox.Physics.SliderJoint).
Assembly: `Sandbox.Engine`.
