/
BodyGyro.yaml
169 lines (167 loc) · 5.67 KB
/
BodyGyro.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
name: BodyGyro
type: class
category: Body Movers
memory_category: Instances
summary: |
Applies a torque to maintain a constant orientation.
description: |
The **BodyGyro** object applies a torque (rotational force) on a
`Class.BasePart` such that it maintains a constant angular displacement, or
orientation. This allows for the creation of parts that point in a certain
direction, as if a real gyroscope were acting upon it. Essentially, it's the
rotational counterpart to a `Class.BodyPosition`.
If you would like to maintain a constant angular velocity, use a
`Class.BodyAngularVelocity` instead.
The `Class.BodyGyro.CFrame|CFrame` property controls the goal orientation.
Only the angular components of the `Datatype.CFrame` are used; position will
make no difference. `Class.BodyGyro.MaxTorque|MaxTorque` limits the amount of
angular force that may be applied, `Class.BodyGyro.P|P` controls the power
used in achieving the goal orientation, and `Class.BodyGyro.D|D` controls
dampening behavior.
code_samples:
- BodyGyro1
inherits:
- BodyMover
tags:
- Deprecated
deprecation_message: |
This object is deprecated and should not be used for new work. Use
`Class.AlignOrientation` instead.
properties:
- name: BodyGyro.CFrame
summary: |
Determines the target orientation (translational component ignored).
description: |
The CFrame property (not to be confused with `Class.BasePart.CFrame`)
determines the target orientation towards which torque will be exerted.
Since `Class.BodyGyro` does not apply translational force, the
translational/positional component of the `Datatype.CFrame`,
`Datatype.CFrame.p`, is ignored. Consider using one of the following
CFrame constructors in setting this property:
`Datatype.CFrame.fromAxisAngle()`, `Datatype.CFrame.fromEulerAnglesXYZ()`
or `Datatype.CFrame.fromEulerAnglesYXZ()`. Beware of
[gimbal lock](https://en.wikipedia.org/wiki/Gimbal_lock) as you choose
which of these methods and what angles (in radians). Additionally, you
could use `CFrame.new(gyro.Parent.Position, targetPosition)` in order to
have the BodyGyro "look at" a targetPosition (`Datatype.Vector3`).
code_samples:
type: CFrame
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Goals
serialization:
can_load: true
can_save: true
- name: BodyGyro.D
summary: |
Determines the amount of dampening to use in reaching the goal
`Class.BodyGyro.CFrame|CFrame`.
description: |
The D property is how much **dampening** will be applied to the torque
used to reach the goal `Class.BodyGyro.CFrame|CFrame`. When the part
approaches the goal orientation it needs to decelerate, otherwise it will
rotate past the goal and have to stop and re-accelerate back toward the
goal. This is often creates undesirable **rubber-banding** effect, so
applying dampening using this property is how that effect is avoided. The
higher this value is set, the greater the dampening curve becomes, or the
slower the part will approach the goal orientation.
code_samples:
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Goals
serialization:
can_load: true
can_save: true
- name: BodyGyro.MaxTorque
summary: |
Determines the limit on how much torque that may be applied to each axis.
description: |
The MaxTorque property determines the limit on the amount of torque that
may be applied on each axis in reaching the goal orientation
(`Class.BodyGyro.CFrame|CFrame`). If a part isn't moving, consider
increasing this value (also check that it is not
`Class.BasePart.Anchored|Anchored` or attached to any anchored parts).
code_samples:
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Goals
serialization:
can_load: true
can_save: true
- name: BodyGyro.P
summary: |
Determines how aggressive of a torque is applied in reaching the goal
orientation.
description: |
The P property determines how much
[power](<https://en.wikipedia.org/wiki/Power_(physics)>) is used while
applying torque in order to reach the goal `Class.BodyGyro.CFrame|CFrame`.
The higher this value, the more power will be used and the faster it will
be used.
code_samples:
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Goals
serialization:
can_load: true
can_save: true
- name: BodyGyro.cframe
summary: ''
description: ''
code_samples:
type: CFrame
tags:
- NotReplicated
- Deprecated
deprecation_message: |
This property is a deprecated variant of `Class.BodyGyro.CFrame` which
should be used instead.
security:
read: None
write: None
thread_safety: ReadSafe
category: Goals
serialization:
can_load: true
can_save: false
- name: BodyGyro.maxTorque
summary: ''
description: ''
code_samples:
type: Vector3
tags:
- NotReplicated
- Deprecated
deprecation_message: |
This property is a deprecated variant of `Class.BodyGyro.MaxTorque` which
should be used instead.
security:
read: None
write: None
thread_safety: ReadSafe
category: Goals
serialization:
can_load: true
can_save: false
methods: []
events: []
callbacks: []