LinearVelocity
Applies force on an assembly to maintain a constant linear velocity.
Memory category | PhysicsParts |
---|
Member index 13
Description
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.
History 23
- 592 Add ForceLimitsEnabled
- 582 Add MaxPlanarAxesForce
- 582 Add MaxAxesForce
- 582 Add ForceLimitMode
- 553 Change Default of VelocityConstraintMode from to Vector
- 553 Change Default of VectorVelocity from to Vector3(0, 0, 0)
- 553 Change Default of SecondaryTangentAxis from to Vector3(0, 1, 0)
- 553 Change Default of RelativeTo from to World
- 553 Change Default of PrimaryTangentAxis from to Vector3(1, 0, 0)
- 553 Change Default of PlaneVelocity from to Vector2(0, 0)
- 553 Change Default of MaxForce from to 1000
- 553 Change Default of LineVelocity from to -0
- 553 Change Default of LineDirection from to Vector3(1, 0, 0)
- 494 Add VelocityConstraintMode
- 494 Add VectorVelocity
- 494 Add SecondaryTangentAxis
- 494 Add RelativeTo
- 494 Add PrimaryTangentAxis
- 494 Add PlaneVelocity
- 494 Add MaxForce
- 494 Add LineVelocity
- 494 Add LineDirection
- 494 Add LinearVelocity
Members 13
ForceLimitMode
Type | Default | |
---|---|---|
ForceLimitMode | Magnitude |
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.
Thread safety | ReadSafe |
---|---|
Category | Limits |
Loaded/Saved | true |
History 1
- 582 Add ForceLimitMode
ForceLimitsEnabled
Type | Default | |
---|---|---|
bool | true |
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.
Thread safety | ReadSafe |
---|---|
Category | Mode |
Loaded/Saved | true |
History 1
LineDirection
Type | Default | |
---|---|---|
Vector3 | 1, 0, 0 |
The normalized Vector3 direction for constraining the velocity along a line, when VelocityConstraintMode is set to Line.
Thread safety | ReadSafe |
---|---|
Category | Line |
Loaded/Saved | true |
History 2
- 553 Change Default of LineDirection from to Vector3(1, 0, 0)
- 494 Add LineDirection
LineVelocity
Type | Default | |
---|---|---|
float | -0 |
Float value of the velocity when VelocityConstraintMode is set to Line.
Thread safety | ReadSafe |
---|---|
Category | Line |
Loaded/Saved | true |
History 2
- 553 Change Default of LineVelocity from to -0
- 494 Add LineVelocity
MaxAxesForce
Type | Default | |
---|---|---|
Vector3 | 1000, 1000, 1000 |
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.
Thread safety | ReadSafe |
---|---|
Category | Limits |
Loaded/Saved | true |
History 1
- 582 Add MaxAxesForce
MaxForce
Type | Default | |
---|---|---|
float | 1000 |
Maximum magnitude of the force vector the constraint can apply. Only used if ForceLimitsEnabled is true and ForceLimitMode is Magnitude.
Thread safety | ReadSafe |
---|---|
Category | Limits |
Loaded/Saved | true |
MaxPlanarAxesForce
Type | Default | |
---|---|---|
Vector2 | 1000, 1000 |
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.
Thread safety | ReadSafe |
---|---|
Category | Limits |
Loaded/Saved | true |
History 1
PlaneVelocity
Type | Default | |
---|---|---|
Vector2 | 0, 0 |
Vector2 value of the velocity in each tangent direction of the plane, when VelocityConstraintMode is set to Plane.
Thread safety | ReadSafe |
---|---|
Category | Plane |
Loaded/Saved | true |
History 2
- 553 Change Default of PlaneVelocity from to Vector2(0, 0)
- 494 Add PlaneVelocity
PrimaryTangentAxis
Type | Default | |
---|---|---|
Vector3 | 1, 0, 0 |
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 Attachment0, this axis is the Axis of Attachment0.
- If RelativeTo is set to Attachment1, this axis is the Axis of Attachment1.
- If RelativeTo is set to World, this value must be specified in the world space.
Thread safety | ReadSafe |
---|---|
Category | Plane |
Loaded/Saved | true |
History 2
- 553 Change Default of PrimaryTangentAxis from to Vector3(1, 0, 0)
- 494 Add PrimaryTangentAxis
RelativeTo
Type | Default | |
---|---|---|
ActuatorRelativeTo | World |
Sets the ActuatorRelativeTo property for the LinearVelocity constraint.
Thread safety | ReadSafe |
---|---|
Category | Mode |
Loaded/Saved | true |
History 2
- 553 Change Default of RelativeTo from to World
- 494 Add RelativeTo
SecondaryTangentAxis
Type | Default | |
---|---|---|
Vector3 | 0, 1, 0 |
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 Attachment0, this axis is the SecondaryAxis of Attachment0.
- If RelativeTo is set to Attachment1, this axis is the SecondaryAxis of Attachment1.
- If RelativeTo is set to World, this value must be specified in the world space.
Thread safety | ReadSafe |
---|---|
Category | Plane |
Loaded/Saved | true |
History 2
- 553 Change Default of SecondaryTangentAxis from to Vector3(0, 1, 0)
- 494 Add SecondaryTangentAxis
VectorVelocity
Type | Default | |
---|---|---|
Vector3 | 0, 0, 0 |
Vector3 velocity value when VelocityConstraintMode is set to Vector.
Thread safety | ReadSafe |
---|---|
Category | Vector |
Loaded/Saved | true |
History 2
- 553 Change Default of VectorVelocity from to Vector3(0, 0, 0)
- 494 Add VectorVelocity
VelocityConstraintMode
Type | Default | |
---|---|---|
VelocityConstraintMode | Vector |
The mode of the LinearVelocity constraint: Line, Plane, or Vector. Default is Vector.
Thread safety | ReadSafe |
---|---|
Category | Mode |
Loaded/Saved | true |
History 2
- 553 Change Default of VelocityConstraintMode from to Vector
- 494 Add VelocityConstraintMode