# LinearVelocity

The LinearVelocity constraint applies force on an assembly to maintain a constant linear velocity. It can be set to apply force along a Vector3, line, or 2D plane. Alternatively:

- If you want to control the amount of force applied, use a VectorForce constraint.
- If you only need initial linear velocity, set the AssemblyLinearVelocity property directly on the assembly.

When configuring this constraint, it may be helpful to study Roblox Units to understand how Roblox units compare to metric units.

#### Relativity

Application of velocity can be controlled through the constraint's RelativeTo property. If set to World, force will be applied in world coordinates, independent of the parent or attachment orientations. If set to Attachment0 or Attachment1, force will be applied relative to Attachment0 or Attachment1 respectively.

## Summary

### Properties

Determines how the constraint force will be limited.

Determines if the constraint force will be limited or if the physics solver can apply an unlimited force to achieve the target velocity.

The normalized Vector3 direction for constraining the velocity along a line.

Float value of the velocity when VelocityConstraintMode is set to Line.

Maximum force along each axis that the constraint can apply to achieve the vector velocity. Only used if ForceLimitsEnabled is true, ForceLimitMode is PerAxis, and VelocityConstraintMode is Vector.

Maximum magnitude of the force vector the constraint can apply.

Maximum force along each axis that the constraint can apply to achieve the plane velocity. Only used if ForceLimitsEnabled is true, ForceLimitMode is PerAxis, and VelocityConstraintMode is Plane.

Vector2 value of the velocity in each tangent direction of the plane.

The primary axis in the plane, when VelocityConstraintMode is set to Plane.

Sets the Enum.ActuatorRelativeTo property for the LinearVelocity constraint.

The secondary axis in the plane, when VelocityConstraintMode is set to Plane.

Vector3 velocity value when VelocityConstraintMode is set to Vector.

The mode of the LinearVelocity constraint.

Indicates if the constraint is currently active in the world.

The Attachment that is connected to Constraint.Attachment1.

The Attachment that is connected to Constraint.Attachment0.

The color of the constraint.

Toggles whether or not the constraint is enabled.

Toggles the constraint's visibility.

## Properties

### ForceLimitMode

Determines how the constraint force will be limited. When set to Magnitude, the constraint force will have a magnitude less than MaxForce. When set to PerAxis, the force along each axis will be less than the corresponding value in MaxAxesForce when VelocityConstraintMode is Vector or the corresponding value in MaxPlanarAxesForce when VelocityConstraintMode is Plane. Only used when ForceLimitsEnabled is true.

### ForceLimitsEnabled

Determines if the constraint force will be limited or if the physics solver can apply an unlimited force to achieve the target velocity. When enabled, the constraint force is limited based on ForceLimitMode. When disabled, the physics solver will always apply a force that is large enough to achieve the target velocity.

### LineDirection

The normalized Vector3 direction for constraining the velocity along a line, when VelocityConstraintMode is set to Line.

### MaxAxesForce

Maximum force along each axis that the constraint can apply to achieve the target velocity. Only used if ForceLimitsEnabled is true, ForceLimitMode is PerAxis, and VelocityConstraintMode is Vector. The axes used to apply the limit correspond to the RelativeTo property.

### MaxForce

Maximum magnitude of the force vector the constraint can apply. Only used if ForceLimitsEnabled is true and ForceLimitMode is Magnitude.

### MaxPlanarAxesForce

Maximum force along each axis that the constraint can apply to achieve the plane velocity. Only used if ForceLimitsEnabled is true, ForceLimitMode is PerAxis, and VelocityConstraintMode is Plane. The axes used to apply the limit correspond to the RelativeTo property.

### PlaneVelocity

Vector2 value of the velocity in each tangent direction of the plane, when VelocityConstraintMode is set to Plane.

### PrimaryTangentAxis

The primary axis in the plane, when VelocityConstraintMode is set to Plane. Value depends on the value of RelativeTo as follows:

- If RelativeTo is set to World, this value must be specified in the world space.

### SecondaryTangentAxis

The secondary axis in the plane, when VelocityConstraintMode is set to Plane. Value depends on the value of RelativeTo as follows:

- If RelativeTo is set to World, this value must be specified in the world space.

### VelocityConstraintMode

The mode of the LinearVelocity constraint: Line, Plane, or Vector. Default is Vector.