LinearVelocity

LinearVelocity : Constraint

Overview

A physics constraint instance used to move an Object at a constant linear velocity.

The reference for applying force depends on whether the RelativeTo property is set to World or Attachment

Properties

ForceLimitMode

Enum.ForceLimitMode

Determines whether to limit the generated force by a single value or per axis.

In Magnitude mode, manages the overall force magnitude to stay within the maximum value. On the other hand, in PerAxis mode, calculates force for each axis independently, maintaining values within MaxAxesForce or MaxPlanarAxesForce based on the current velocity constraint method.

Only applies when ForceLimitsEnabled is active.

Code Samples

ForceLimitsEnabled

bool

Determines whether the force is limited.

When enabled, the force is capped by MaxForce; when disabled, the physics engine can freely apply unlimited force to achieve the target velocity.

Code Samples

LineDirection

Vector3

When VelocityConstraintMode is set to Line, this is the direction of the normalized Vector3 that restricts velocity along a linear direction.

Code Samples

LineVelocity

number

When VelocityConstraintMode is Line, sets the velocity in the linear movement direction.

Code Samples

MaxAxesForce

Vector3

Currently not supported.

Code Samples

MaxForce

number

When ForceLimitsEnabled is true, sets the maximum force magnitude that can be applied.

Code Samples

PlaneVelocity

Vector2

When VelocityConstraintMode is Plane, sets the velocity for the two directions (X, Y) on the plane.

Code Samples

PrimaryTangentAxis

Vector3

Currently not supported.

Code Samples

RelativeTo

Enum.ActuatorRelativeTo

Sets the reference coordinate system for applying force.

Code Samples

SecondaryTangentAxis

Vector3

Currently not supported.

Code Samples

VectorVelocity

Vector3

When VelocityConstraintMode is Vector, sets the velocity in the direction of the Vector.

Code Samples

VelocityConstraintMode

Enum.VelocityConstranumberMode

Sets how velocity is restricted.

  • Line: Linear movement.

  • Plane: Movement within a specified plane.

  • Vector: Movement in vector3 direction (default).

Code Samples

Methods

Events

See also

Physicschevron-right

Last updated