/
LinearVelocity.yaml
362 lines (356 loc) · 12.8 KB
/
LinearVelocity.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
name: LinearVelocity
type: class
category:
memory_category: PhysicsParts
summary: |
Applies force on an assembly to maintain a **constant** linear velocity.
description: |
The **LinearVelocity** constraint applies force on an assembly to maintain a
**constant** linear velocity. It can be set to apply force along a
`Datatype.Vector3`, line, or 2D plane. Alternatively:
- If you want to control the amount of force applied, use a
`Class.VectorForce` constraint.
- If you only need **initial** linear velocity, set the
`Class.BasePart.AssemblyLinearVelocity|AssemblyLinearVelocity` property
directly on the assembly.
When configuring this constraint, it may be helpful to study
[Roblox Units](../../../physics/units.md) to understand how Roblox units
compare to metric units.
#### Relativity
Application of velocity can be controlled through the constraint's
`Class.LinearVelocity.RelativeTo|RelativeTo` property. If set to
`Enum.ActuatorRelativeTo|World`, force will be applied in world coordinates,
independent of the parent or attachment orientations. If set to
`Enum.ActuatorRelativeTo|Attachment0` or
`Enum.ActuatorRelativeTo|Attachment1`, force will be applied relative to
`Class.Constraint.Attachment0|Attachment0` or
`Class.Constraint.Attachment1|Attachment1` respectively.
code_samples:
inherits:
- Constraint
tags: []
deprecation_message: ''
properties:
- name: LinearVelocity.ForceLimitMode
summary: |
Determines how the constraint force will be limited.
description: |
Determines how the constraint force will be limited. When set to
`Enum.ForceLimitMode|Magnitude`, the constraint force will have a
magnitude less than `Class.LinearVelocity.MaxForce|MaxForce`. When set to
`Enum.ForceLimitMode|PerAxis`, the force along each axis will be less than
the corresponding value in
`Class.LinearVelocity.MaxAxesForce|MaxAxesForce` when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
`Enum.VelocityConstraintMode|Vector` or the corresponding value in
`Class.LinearVelocity.MaxPlanarAxesForce|MaxPlanarAxesForce` when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
`Enum.VelocityConstraintMode|Plane`. Only used when
`Class.LinearVelocity.ForceLimitsEnabled|ForceLimitsEnabled` is true.
code_samples: []
type: ForceLimitMode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Limits
serialization:
can_load: true
can_save: true
- name: LinearVelocity.ForceLimitsEnabled
summary: |
Determines if the constraint force will be limited or if the physics
solver can apply an unlimited force to achieve the target velocity.
description: |
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
`Class.LinearVelocity.ForceLimitMode|ForceLimitMode`. When disabled, the
physics solver will always apply a force that is large enough to achieve
the target velocity.
code_samples: []
type: bool
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Mode
serialization:
can_load: true
can_save: true
- name: LinearVelocity.LineDirection
summary: |
The normalized `Datatype.Vector3` direction for constraining the velocity
along a line.
description: |
The normalized `Datatype.Vector3` direction for constraining the velocity
along a line, when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Line`.
code_samples:
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Line
serialization:
can_load: true
can_save: true
- name: LinearVelocity.LineVelocity
summary: |
Float value of the velocity when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Line`.
description: |
Float value of the velocity when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Line`.
code_samples:
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Line
serialization:
can_load: true
can_save: true
- name: LinearVelocity.MaxAxesForce
summary: |
Maximum force along each axis that the constraint can apply to achieve the
vector velocity. Only used if
`Class.LinearVelocity.ForceLimitsEnabled|ForceLimitsEnabled` is true,
`Class.LinearVelocity.ForceLimitMode|ForceLimitMode` is
`Enum.ForceLimitMode|PerAxis`, and
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
`Enum.VelocityConstraintMode|Vector`.
description: |
Maximum force along each axis that the constraint can apply to achieve the
target velocity. Only used if
`Class.LinearVelocity.ForceLimitsEnabled|ForceLimitsEnabled` is true,
`Class.LinearVelocity.ForceLimitMode|ForceLimitMode` is
`Enum.ForceLimitMode|PerAxis`, and
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
`Enum.VelocityConstraintMode|Vector`. The axes used to apply the limit
correspond to the `Class.LinearVelocity.RelativeTo|RelativeTo` property.
code_samples: []
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Limits
serialization:
can_load: true
can_save: true
- name: LinearVelocity.MaxForce
summary: |
Maximum magnitude of the force vector the constraint can apply.
description: |
Maximum magnitude of the force vector the constraint can apply. Only used
if `Class.LinearVelocity.ForceLimitsEnabled|ForceLimitsEnabled` is true
and `Class.LinearVelocity.ForceLimitMode|ForceLimitMode` is
`Enum.ForceLimitMode|Magnitude`.
code_samples:
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Limits
serialization:
can_load: true
can_save: true
- name: LinearVelocity.MaxPlanarAxesForce
summary: |
Maximum force along each axis that the constraint can apply to achieve the
plane velocity. Only used if
`Class.LinearVelocity.ForceLimitsEnabled|ForceLimitsEnabled` is true,
`Class.LinearVelocity.ForceLimitMode|ForceLimitMode` is
`Enum.ForceLimitMode|PerAxis`, and
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
`Enum.VelocityConstraintMode|Plane`.
description: |
Maximum force along each axis that the constraint can apply to achieve the
plane velocity. Only used if
`Class.LinearVelocity.ForceLimitsEnabled|ForceLimitsEnabled` is true,
`Class.LinearVelocity.ForceLimitMode|ForceLimitMode` is
`Enum.ForceLimitMode|PerAxis`, and
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
`Enum.VelocityConstraintMode|Plane`. The axes used to apply the limit
correspond to the `Class.LinearVelocity.RelativeTo|RelativeTo` property.
code_samples: []
type: Vector2
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Limits
serialization:
can_load: true
can_save: true
- name: LinearVelocity.PlaneVelocity
summary: |
`Datatype.Vector2` value of the velocity in each tangent direction of the
plane.
description: |
`Datatype.Vector2` value of the velocity in each tangent direction of the
plane, when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Plane`.
code_samples:
type: Vector2
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Plane
serialization:
can_load: true
can_save: true
- name: LinearVelocity.PrimaryTangentAxis
summary: |
The primary axis in the plane, when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Plane`.
description: |
The primary axis in the plane, when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Plane`. Value depends on the value of
`Class.LinearVelocity.RelativeTo|RelativeTo` as follows:
- If `Class.LinearVelocity.RelativeTo|RelativeTo` is set to
`Enum.ActuatorRelativeTo|Attachment0`, this axis is the
`Class.Attachment.Axis|Axis` of
`Class.Constraint.Attachment0|Attachment0`.
- If `Class.LinearVelocity.RelativeTo|RelativeTo` is set to
`Enum.ActuatorRelativeTo|Attachment1`, this axis is the
`Class.Attachment.Axis|Axis` of
`Class.Constraint.Attachment1|Attachment1`.
- If `Class.LinearVelocity.RelativeTo|RelativeTo` is set to
`Enum.ActuatorRelativeTo|World`, this value must be specified in the
world space.
code_samples:
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Plane
serialization:
can_load: true
can_save: true
- name: LinearVelocity.RelativeTo
summary: |
Sets the `Enum.ActuatorRelativeTo` property for the `Class.LinearVelocity`
constraint.
description: |
Sets the `Enum.ActuatorRelativeTo` property for the `Class.LinearVelocity`
constraint.
code_samples:
type: ActuatorRelativeTo
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Mode
serialization:
can_load: true
can_save: true
- name: LinearVelocity.SecondaryTangentAxis
summary: |
The secondary axis in the plane, when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Plane`.
description: |
The secondary axis in the plane, when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Plane`. Value depends on the value of
`Class.LinearVelocity.RelativeTo|RelativeTo` as follows:
- If `Class.LinearVelocity.RelativeTo|RelativeTo` is set to
`Enum.ActuatorRelativeTo|Attachment0`, this axis is the
`Class.Attachment.SecondaryAxis|SecondaryAxis` of
`Class.Constraint.Attachment0|Attachment0`.
- If `Class.LinearVelocity.RelativeTo|RelativeTo` is set to
`Enum.ActuatorRelativeTo|Attachment1`, this axis is the
`Class.Attachment.SecondaryAxis|SecondaryAxis` of
`Class.Constraint.Attachment1|Attachment1`.
- If `Class.LinearVelocity.RelativeTo|RelativeTo` is set to
`Enum.ActuatorRelativeTo|World`, this value must be specified in the
world space.
code_samples:
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Plane
serialization:
can_load: true
can_save: true
- name: LinearVelocity.VectorVelocity
summary: |
`Datatype.Vector3` velocity value when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Vector`.
description: |
`Datatype.Vector3` velocity value when
`Class.LinearVelocity.VelocityConstraintMode|VelocityConstraintMode` is
set to `Enum.VelocityConstraintMode|Vector`.
code_samples:
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Vector
serialization:
can_load: true
can_save: true
- name: LinearVelocity.VelocityConstraintMode
summary: |
The mode of the `Class.LinearVelocity` constraint.
description: |
The mode of the `Class.LinearVelocity` constraint:
`Enum.VelocityConstraintMode|Line`, `Enum.VelocityConstraintMode|Plane`,
or `Enum.VelocityConstraintMode|Vector`. Default is
`Enum.VelocityConstraintMode|Vector`.
code_samples:
type: VelocityConstraintMode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Mode
serialization:
can_load: true
can_save: true
methods: []
events: []
callbacks: []