@quenty/ragdoll 15.23.3 → 15.23.4-canary.559.339cfa7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/package.json +32 -32
- package/src/Client/Classes/RagdollCameraShakeClient.lua +72 -64
- package/src/Client/Classes/RagdollClient.lua +1 -2
- package/src/Client/Classes/RagdollHumanoidOnDeathClient.lua +2 -2
- package/src/Client/Classes/RagdollHumanoidOnFallClient.lua +1 -1
- package/src/Client/Classes/RagdollableClient.lua +5 -5
- package/src/Client/RagdollBindersClient.lua +5 -5
- package/src/Client/RagdollServiceClient.lua +3 -3
- package/src/Server/Classes/Ragdoll.lua +3 -3
- package/src/Server/Classes/RagdollCameraShake.lua +2 -3
- package/src/Server/Classes/RagdollHumanoidOnDeath.lua +2 -2
- package/src/Server/Classes/RagdollHumanoidOnFall.lua +1 -2
- package/src/Server/Classes/Ragdollable.lua +7 -7
- package/src/Server/Classes/UnragdollAutomatically.lua +37 -35
- package/src/Server/Classes/UnragdollAutomaticallyConstants.lua +3 -3
- package/src/Server/RagdollBindersServer.lua +6 -6
- package/src/Server/RagdollService.lua +3 -3
- package/src/Shared/Classes/BindableRagdollHumanoidOnFall.lua +3 -5
- package/src/Shared/Classes/RagdollHumanoidOnFallConstants.lua +2 -2
- package/src/Shared/Classes/RagdollableBase.lua +1 -1
- package/src/Shared/Interfaces/RagdollableInterface.lua +7 -8
- package/src/Shared/RagdollServiceConstants.lua +2 -2
- package/src/Shared/Rigging/RagdollAdditionalAttachmentUtils.lua +44 -22
- package/src/Shared/Rigging/RagdollBallSocketUtils.lua +163 -163
- package/src/Shared/Rigging/RagdollCollisionUtils.lua +60 -61
- package/src/Shared/Rigging/RagdollMotorData.lua +3 -3
- package/src/Shared/Rigging/RagdollMotorLimitData.lua +78 -78
- package/src/Shared/Rigging/RagdollMotorUtils.lua +2 -2
- package/src/Shared/Rigging/RxRagdollUtils.lua +3 -3
|
@@ -12,172 +12,172 @@ local Workspace = game:GetService("Workspace")
|
|
|
12
12
|
local EnumUtils = require("EnumUtils")
|
|
13
13
|
local Maid = require("Maid")
|
|
14
14
|
local RagdollMotorLimitData = require("RagdollMotorLimitData")
|
|
15
|
+
local Rx = require("Rx")
|
|
15
16
|
local RxBrioUtils = require("RxBrioUtils")
|
|
16
17
|
local RxInstanceUtils = require("RxInstanceUtils")
|
|
17
|
-
local RxR15Utils = require("RxR15Utils")
|
|
18
|
-
local Rx = require("Rx")
|
|
19
18
|
local RxPhysicsUtils = require("RxPhysicsUtils")
|
|
19
|
+
local RxR15Utils = require("RxR15Utils")
|
|
20
20
|
|
|
21
21
|
local RagdollBallSocketUtils = {}
|
|
22
22
|
|
|
23
23
|
local R6_RAGDOLL_RIG = {
|
|
24
24
|
{
|
|
25
|
-
part0Name = "Torso"
|
|
26
|
-
part1Name ="Head",
|
|
27
|
-
attachmentName = "NeckAttachment"
|
|
28
|
-
motorParentName = "Torso"
|
|
29
|
-
motorName = "Neck"
|
|
30
|
-
limitData = RagdollMotorLimitData.R6_NECK_LIMITS
|
|
31
|
-
}
|
|
25
|
+
part0Name = "Torso",
|
|
26
|
+
part1Name = "Head",
|
|
27
|
+
attachmentName = "NeckAttachment",
|
|
28
|
+
motorParentName = "Torso",
|
|
29
|
+
motorName = "Neck",
|
|
30
|
+
limitData = RagdollMotorLimitData.R6_NECK_LIMITS,
|
|
31
|
+
},
|
|
32
32
|
{
|
|
33
|
-
part0Name = "Torso"
|
|
34
|
-
part1Name ="Left Leg"
|
|
35
|
-
attachmentName = "LeftHipAttachment"
|
|
36
|
-
motorParentName = "Torso"
|
|
37
|
-
motorName = "Left Hip"
|
|
38
|
-
limitData = RagdollMotorLimitData.R6_HIP_LIMITS
|
|
39
|
-
}
|
|
33
|
+
part0Name = "Torso",
|
|
34
|
+
part1Name = "Left Leg",
|
|
35
|
+
attachmentName = "LeftHipAttachment",
|
|
36
|
+
motorParentName = "Torso",
|
|
37
|
+
motorName = "Left Hip",
|
|
38
|
+
limitData = RagdollMotorLimitData.R6_HIP_LIMITS,
|
|
39
|
+
},
|
|
40
40
|
{
|
|
41
|
-
part0Name = "Torso"
|
|
42
|
-
part1Name ="Right Leg"
|
|
43
|
-
attachmentName = "RightHipAttachment"
|
|
44
|
-
motorParentName = "Torso"
|
|
45
|
-
motorName = "Right Hip"
|
|
46
|
-
limitData = RagdollMotorLimitData.R6_HIP_LIMITS
|
|
47
|
-
}
|
|
41
|
+
part0Name = "Torso",
|
|
42
|
+
part1Name = "Right Leg",
|
|
43
|
+
attachmentName = "RightHipAttachment",
|
|
44
|
+
motorParentName = "Torso",
|
|
45
|
+
motorName = "Right Hip",
|
|
46
|
+
limitData = RagdollMotorLimitData.R6_HIP_LIMITS,
|
|
47
|
+
},
|
|
48
48
|
{
|
|
49
|
-
part0Name = "Torso"
|
|
50
|
-
part1Name ="Left Arm"
|
|
51
|
-
attachmentName = "LeftShoulderRagdollAttachment"
|
|
52
|
-
motorParentName = "Torso"
|
|
53
|
-
motorName = "Left Shoulder"
|
|
54
|
-
limitData = RagdollMotorLimitData.R6_SHOULDER_LIMITS
|
|
55
|
-
}
|
|
49
|
+
part0Name = "Torso",
|
|
50
|
+
part1Name = "Left Arm",
|
|
51
|
+
attachmentName = "LeftShoulderRagdollAttachment",
|
|
52
|
+
motorParentName = "Torso",
|
|
53
|
+
motorName = "Left Shoulder",
|
|
54
|
+
limitData = RagdollMotorLimitData.R6_SHOULDER_LIMITS,
|
|
55
|
+
},
|
|
56
56
|
{
|
|
57
|
-
part0Name = "Torso"
|
|
58
|
-
part1Name ="Right Arm"
|
|
59
|
-
attachmentName = "RightShoulderRagdollAttachment"
|
|
60
|
-
motorParentName = "Torso"
|
|
61
|
-
motorName = "Right Shoulder"
|
|
62
|
-
limitData = RagdollMotorLimitData.R6_SHOULDER_LIMITS
|
|
63
|
-
}
|
|
57
|
+
part0Name = "Torso",
|
|
58
|
+
part1Name = "Right Arm",
|
|
59
|
+
attachmentName = "RightShoulderRagdollAttachment",
|
|
60
|
+
motorParentName = "Torso",
|
|
61
|
+
motorName = "Right Shoulder",
|
|
62
|
+
limitData = RagdollMotorLimitData.R6_SHOULDER_LIMITS,
|
|
63
|
+
},
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
local R15_RAGDOLL_RIG = {
|
|
67
67
|
{
|
|
68
|
-
part0Name = "UpperTorso"
|
|
69
|
-
part1Name = "Head"
|
|
70
|
-
attachmentName = "NeckRigAttachment"
|
|
71
|
-
motorParentName = "Head"
|
|
72
|
-
motorName = "Neck"
|
|
73
|
-
limitData = RagdollMotorLimitData.NECK_LIMITS
|
|
74
|
-
}
|
|
68
|
+
part0Name = "UpperTorso",
|
|
69
|
+
part1Name = "Head",
|
|
70
|
+
attachmentName = "NeckRigAttachment",
|
|
71
|
+
motorParentName = "Head",
|
|
72
|
+
motorName = "Neck",
|
|
73
|
+
limitData = RagdollMotorLimitData.NECK_LIMITS,
|
|
74
|
+
},
|
|
75
75
|
{
|
|
76
|
-
part0Name = "LowerTorso"
|
|
77
|
-
part1Name = "UpperTorso"
|
|
78
|
-
attachmentName = "WaistRigAttachment"
|
|
79
|
-
motorParentName = "UpperTorso"
|
|
80
|
-
motorName = "Waist"
|
|
81
|
-
limitData = RagdollMotorLimitData.WAIST_LIMITS
|
|
82
|
-
}
|
|
76
|
+
part0Name = "LowerTorso",
|
|
77
|
+
part1Name = "UpperTorso",
|
|
78
|
+
attachmentName = "WaistRigAttachment",
|
|
79
|
+
motorParentName = "UpperTorso",
|
|
80
|
+
motorName = "Waist",
|
|
81
|
+
limitData = RagdollMotorLimitData.WAIST_LIMITS,
|
|
82
|
+
},
|
|
83
83
|
{
|
|
84
|
-
part0Name = "UpperTorso"
|
|
85
|
-
part1Name = "LeftUpperArm"
|
|
86
|
-
attachmentName = "LeftShoulderRagdollAttachment"
|
|
87
|
-
motorParentName = "LeftUpperArm"
|
|
88
|
-
motorName = "LeftShoulder"
|
|
89
|
-
limitData = RagdollMotorLimitData.SHOULDER_LIMITS
|
|
90
|
-
}
|
|
84
|
+
part0Name = "UpperTorso",
|
|
85
|
+
part1Name = "LeftUpperArm",
|
|
86
|
+
attachmentName = "LeftShoulderRagdollAttachment",
|
|
87
|
+
motorParentName = "LeftUpperArm",
|
|
88
|
+
motorName = "LeftShoulder",
|
|
89
|
+
limitData = RagdollMotorLimitData.SHOULDER_LIMITS,
|
|
90
|
+
},
|
|
91
91
|
{
|
|
92
|
-
part0Name = "LeftUpperArm"
|
|
93
|
-
part1Name = "LeftLowerArm"
|
|
94
|
-
attachmentName = "LeftElbowRigAttachment"
|
|
95
|
-
motorParentName = "LeftLowerArm"
|
|
96
|
-
motorName = "LeftElbow"
|
|
97
|
-
limitData = RagdollMotorLimitData.ELBOW_LIMITS
|
|
98
|
-
}
|
|
92
|
+
part0Name = "LeftUpperArm",
|
|
93
|
+
part1Name = "LeftLowerArm",
|
|
94
|
+
attachmentName = "LeftElbowRigAttachment",
|
|
95
|
+
motorParentName = "LeftLowerArm",
|
|
96
|
+
motorName = "LeftElbow",
|
|
97
|
+
limitData = RagdollMotorLimitData.ELBOW_LIMITS,
|
|
98
|
+
},
|
|
99
99
|
{
|
|
100
|
-
part0Name = "LeftLowerArm"
|
|
101
|
-
part1Name = "LeftHand"
|
|
102
|
-
attachmentName = "LeftWristRigAttachment"
|
|
103
|
-
motorParentName = "LeftHand"
|
|
104
|
-
motorName = "LeftWrist"
|
|
105
|
-
limitData = RagdollMotorLimitData.WRIST_LIMITS
|
|
106
|
-
}
|
|
100
|
+
part0Name = "LeftLowerArm",
|
|
101
|
+
part1Name = "LeftHand",
|
|
102
|
+
attachmentName = "LeftWristRigAttachment",
|
|
103
|
+
motorParentName = "LeftHand",
|
|
104
|
+
motorName = "LeftWrist",
|
|
105
|
+
limitData = RagdollMotorLimitData.WRIST_LIMITS,
|
|
106
|
+
},
|
|
107
107
|
{
|
|
108
|
-
part0Name = "UpperTorso"
|
|
109
|
-
part1Name = "RightUpperArm"
|
|
110
|
-
attachmentName = "RightShoulderRagdollAttachment"
|
|
111
|
-
motorParentName = "RightUpperArm"
|
|
112
|
-
motorName = "RightShoulder"
|
|
113
|
-
limitData = RagdollMotorLimitData.SHOULDER_LIMITS
|
|
114
|
-
}
|
|
108
|
+
part0Name = "UpperTorso",
|
|
109
|
+
part1Name = "RightUpperArm",
|
|
110
|
+
attachmentName = "RightShoulderRagdollAttachment",
|
|
111
|
+
motorParentName = "RightUpperArm",
|
|
112
|
+
motorName = "RightShoulder",
|
|
113
|
+
limitData = RagdollMotorLimitData.SHOULDER_LIMITS,
|
|
114
|
+
},
|
|
115
115
|
{
|
|
116
|
-
part0Name = "RightUpperArm"
|
|
117
|
-
part1Name = "RightLowerArm"
|
|
118
|
-
attachmentName = "RightElbowRigAttachment"
|
|
119
|
-
motorParentName = "RightLowerArm"
|
|
120
|
-
motorName = "RightElbow"
|
|
121
|
-
limitData = RagdollMotorLimitData.ELBOW_LIMITS
|
|
122
|
-
}
|
|
116
|
+
part0Name = "RightUpperArm",
|
|
117
|
+
part1Name = "RightLowerArm",
|
|
118
|
+
attachmentName = "RightElbowRigAttachment",
|
|
119
|
+
motorParentName = "RightLowerArm",
|
|
120
|
+
motorName = "RightElbow",
|
|
121
|
+
limitData = RagdollMotorLimitData.ELBOW_LIMITS,
|
|
122
|
+
},
|
|
123
123
|
{
|
|
124
|
-
part0Name = "RightLowerArm"
|
|
125
|
-
part1Name = "RightHand"
|
|
126
|
-
attachmentName = "RightWristRigAttachment"
|
|
127
|
-
motorParentName = "RightHand"
|
|
128
|
-
motorName = "RightWrist"
|
|
129
|
-
limitData = RagdollMotorLimitData.WRIST_LIMITS
|
|
130
|
-
}
|
|
124
|
+
part0Name = "RightLowerArm",
|
|
125
|
+
part1Name = "RightHand",
|
|
126
|
+
attachmentName = "RightWristRigAttachment",
|
|
127
|
+
motorParentName = "RightHand",
|
|
128
|
+
motorName = "RightWrist",
|
|
129
|
+
limitData = RagdollMotorLimitData.WRIST_LIMITS,
|
|
130
|
+
},
|
|
131
131
|
|
|
132
132
|
{
|
|
133
|
-
part0Name = "LowerTorso"
|
|
134
|
-
part1Name = "LeftUpperLeg"
|
|
135
|
-
attachmentName = "LeftHipRigAttachment"
|
|
136
|
-
motorParentName = "LeftUpperLeg"
|
|
137
|
-
motorName = "LeftHip"
|
|
138
|
-
limitData = RagdollMotorLimitData.HIP_LIMITS
|
|
139
|
-
}
|
|
133
|
+
part0Name = "LowerTorso",
|
|
134
|
+
part1Name = "LeftUpperLeg",
|
|
135
|
+
attachmentName = "LeftHipRigAttachment",
|
|
136
|
+
motorParentName = "LeftUpperLeg",
|
|
137
|
+
motorName = "LeftHip",
|
|
138
|
+
limitData = RagdollMotorLimitData.HIP_LIMITS,
|
|
139
|
+
},
|
|
140
140
|
{
|
|
141
|
-
part0Name = "LeftUpperLeg"
|
|
142
|
-
part1Name = "LeftLowerLeg"
|
|
143
|
-
attachmentName = "LeftKneeRigAttachment"
|
|
144
|
-
motorParentName = "LeftLowerLeg"
|
|
145
|
-
motorName = "LeftKnee"
|
|
146
|
-
limitData = RagdollMotorLimitData.KNEE_LIMITS
|
|
147
|
-
}
|
|
141
|
+
part0Name = "LeftUpperLeg",
|
|
142
|
+
part1Name = "LeftLowerLeg",
|
|
143
|
+
attachmentName = "LeftKneeRigAttachment",
|
|
144
|
+
motorParentName = "LeftLowerLeg",
|
|
145
|
+
motorName = "LeftKnee",
|
|
146
|
+
limitData = RagdollMotorLimitData.KNEE_LIMITS,
|
|
147
|
+
},
|
|
148
148
|
{
|
|
149
|
-
part0Name = "LeftLowerLeg"
|
|
150
|
-
part1Name = "LeftFoot"
|
|
151
|
-
attachmentName = "LeftAnkleRigAttachment"
|
|
152
|
-
motorParentName = "LeftFoot"
|
|
153
|
-
motorName = "LeftAnkle"
|
|
154
|
-
limitData = RagdollMotorLimitData.ANKLE_LIMITS
|
|
155
|
-
}
|
|
149
|
+
part0Name = "LeftLowerLeg",
|
|
150
|
+
part1Name = "LeftFoot",
|
|
151
|
+
attachmentName = "LeftAnkleRigAttachment",
|
|
152
|
+
motorParentName = "LeftFoot",
|
|
153
|
+
motorName = "LeftAnkle",
|
|
154
|
+
limitData = RagdollMotorLimitData.ANKLE_LIMITS,
|
|
155
|
+
},
|
|
156
156
|
|
|
157
157
|
{
|
|
158
|
-
part0Name = "LowerTorso"
|
|
159
|
-
part1Name = "RightUpperLeg"
|
|
160
|
-
attachmentName = "RightHipRigAttachment"
|
|
161
|
-
motorParentName = "RightUpperLeg"
|
|
162
|
-
motorName = "RightHip"
|
|
163
|
-
limitData = RagdollMotorLimitData.HIP_LIMITS
|
|
164
|
-
}
|
|
158
|
+
part0Name = "LowerTorso",
|
|
159
|
+
part1Name = "RightUpperLeg",
|
|
160
|
+
attachmentName = "RightHipRigAttachment",
|
|
161
|
+
motorParentName = "RightUpperLeg",
|
|
162
|
+
motorName = "RightHip",
|
|
163
|
+
limitData = RagdollMotorLimitData.HIP_LIMITS,
|
|
164
|
+
},
|
|
165
165
|
{
|
|
166
|
-
part0Name = "RightUpperLeg"
|
|
167
|
-
part1Name = "RightLowerLeg"
|
|
168
|
-
attachmentName = "RightKneeRigAttachment"
|
|
169
|
-
motorParentName = "RightLowerLeg"
|
|
170
|
-
motorName = "RightKnee"
|
|
171
|
-
limitData = RagdollMotorLimitData.KNEE_LIMITS
|
|
172
|
-
}
|
|
166
|
+
part0Name = "RightUpperLeg",
|
|
167
|
+
part1Name = "RightLowerLeg",
|
|
168
|
+
attachmentName = "RightKneeRigAttachment",
|
|
169
|
+
motorParentName = "RightLowerLeg",
|
|
170
|
+
motorName = "RightKnee",
|
|
171
|
+
limitData = RagdollMotorLimitData.KNEE_LIMITS,
|
|
172
|
+
},
|
|
173
173
|
{
|
|
174
|
-
part0Name = "RightLowerLeg"
|
|
175
|
-
part1Name = "RightFoot"
|
|
176
|
-
attachmentName = "RightAnkleRigAttachment"
|
|
177
|
-
motorParentName = "RightFoot"
|
|
178
|
-
motorName = "RightAnkle"
|
|
179
|
-
limitData = RagdollMotorLimitData.ANKLE_LIMITS
|
|
180
|
-
}
|
|
174
|
+
part0Name = "RightLowerLeg",
|
|
175
|
+
part1Name = "RightFoot",
|
|
176
|
+
attachmentName = "RightAnkleRigAttachment",
|
|
177
|
+
motorParentName = "RightFoot",
|
|
178
|
+
motorName = "RightAnkle",
|
|
179
|
+
limitData = RagdollMotorLimitData.ANKLE_LIMITS,
|
|
180
|
+
},
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
function RagdollBallSocketUtils.getRigData(rigType)
|
|
@@ -207,19 +207,24 @@ function RagdollBallSocketUtils.ensureBallSockets(character, rigType)
|
|
|
207
207
|
RxBrioUtils.switchMapBrio(function(motor)
|
|
208
208
|
if motor then
|
|
209
209
|
return RxBrioUtils.flatCombineLatest({
|
|
210
|
-
motor = Rx.of(motor)
|
|
211
|
-
part1 = RxR15Utils.observeCharacterPartBrio(character, part1Name)
|
|
212
|
-
attachment0 = RxR15Utils.observeRigAttachmentBrio(character, part0Name, attachmentName)
|
|
213
|
-
attachment1 = RxR15Utils.observeRigAttachmentBrio(character, part1Name, attachmentName)
|
|
214
|
-
limitData = Rx.of(limitData)
|
|
210
|
+
motor = Rx.of(motor),
|
|
211
|
+
part1 = RxR15Utils.observeCharacterPartBrio(character, part1Name),
|
|
212
|
+
attachment0 = RxR15Utils.observeRigAttachmentBrio(character, part0Name, attachmentName),
|
|
213
|
+
attachment1 = RxR15Utils.observeRigAttachmentBrio(character, part1Name, attachmentName),
|
|
214
|
+
limitData = Rx.of(limitData),
|
|
215
215
|
})
|
|
216
216
|
else
|
|
217
217
|
return Rx.of({})
|
|
218
218
|
end
|
|
219
|
-
end)
|
|
219
|
+
end),
|
|
220
220
|
RxBrioUtils.where(function(motorState)
|
|
221
|
-
return motorState.attachment0
|
|
222
|
-
|
|
221
|
+
return motorState.attachment0
|
|
222
|
+
and motorState.attachment1
|
|
223
|
+
and motorState.part1
|
|
224
|
+
and motorState.motor
|
|
225
|
+
and true
|
|
226
|
+
or false
|
|
227
|
+
end),
|
|
223
228
|
})
|
|
224
229
|
|
|
225
230
|
topMaid:GiveTask(observable:Subscribe(function(brio)
|
|
@@ -241,25 +246,22 @@ function RagdollBallSocketUtils.ensureBallSockets(character, rigType)
|
|
|
241
246
|
ballSocket.Attachment0 = motorState.attachment0
|
|
242
247
|
ballSocket.Attachment1 = motorState.attachment1
|
|
243
248
|
|
|
244
|
-
maid:GiveTask(limitValue.UpperAngle:Observe()
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
:Subscribe(function(value)
|
|
254
|
-
ballSocket.TwistUpperAngle = value
|
|
255
|
-
end))
|
|
249
|
+
maid:GiveTask(limitValue.UpperAngle:Observe():Subscribe(function(value)
|
|
250
|
+
ballSocket.UpperAngle = value
|
|
251
|
+
end))
|
|
252
|
+
maid:GiveTask(limitValue.TwistLowerAngle:Observe():Subscribe(function(value)
|
|
253
|
+
ballSocket.TwistLowerAngle = value
|
|
254
|
+
end))
|
|
255
|
+
maid:GiveTask(limitValue.TwistUpperAngle:Observe():Subscribe(function(value)
|
|
256
|
+
ballSocket.TwistUpperAngle = value
|
|
257
|
+
end))
|
|
256
258
|
|
|
257
259
|
maid:GiveTask(Rx.combineLatest({
|
|
258
|
-
frictionTorque = limitValue.FrictionTorque:Observe()
|
|
259
|
-
referenceGravity = limitValue.ReferenceGravity:Observe()
|
|
260
|
-
referenceMass = limitValue.ReferenceMass:Observe()
|
|
261
|
-
gravity = RxInstanceUtils.observeProperty(Workspace, "Gravity")
|
|
262
|
-
mass = RxPhysicsUtils.observePartMass(motorState.part1)
|
|
260
|
+
frictionTorque = limitValue.FrictionTorque:Observe(),
|
|
261
|
+
referenceGravity = limitValue.ReferenceGravity:Observe(),
|
|
262
|
+
referenceMass = limitValue.ReferenceMass:Observe(),
|
|
263
|
+
gravity = RxInstanceUtils.observeProperty(Workspace, "Gravity"),
|
|
264
|
+
mass = RxPhysicsUtils.observePartMass(motorState.part1),
|
|
263
265
|
}):Subscribe(function(state)
|
|
264
266
|
local gravityScale = state.gravity / state.referenceGravity
|
|
265
267
|
local referenceMass = state.referenceMass
|
|
@@ -268,12 +270,10 @@ function RagdollBallSocketUtils.ensureBallSockets(character, rigType)
|
|
|
268
270
|
end))
|
|
269
271
|
|
|
270
272
|
ballSocket.Parent = motorState.part1
|
|
271
|
-
|
|
272
273
|
end))
|
|
273
274
|
end
|
|
274
275
|
|
|
275
276
|
return topMaid
|
|
276
277
|
end
|
|
277
278
|
|
|
278
|
-
|
|
279
|
-
return RagdollBallSocketUtils
|
|
279
|
+
return RagdollBallSocketUtils
|
|
@@ -5,85 +5,85 @@
|
|
|
5
5
|
local require = require(script.Parent.loader).load(script)
|
|
6
6
|
|
|
7
7
|
local EnumUtils = require("EnumUtils")
|
|
8
|
+
local Maid = require("Maid")
|
|
8
9
|
local RxBrioUtils = require("RxBrioUtils")
|
|
9
10
|
local RxR15Utils = require("RxR15Utils")
|
|
10
|
-
local Maid = require("Maid")
|
|
11
11
|
|
|
12
12
|
local RagdollCollisionUtils = {}
|
|
13
13
|
|
|
14
14
|
local R15_NO_COLLIDES = {
|
|
15
|
-
{"LowerTorso", "LeftUpperArm"},
|
|
16
|
-
{"LeftUpperArm", "LeftHand"},
|
|
15
|
+
{ "LowerTorso", "LeftUpperArm" },
|
|
16
|
+
{ "LeftUpperArm", "LeftHand" },
|
|
17
17
|
|
|
18
|
-
{"LowerTorso", "RightUpperArm"},
|
|
19
|
-
{"RightUpperArm", "RightHand"},
|
|
18
|
+
{ "LowerTorso", "RightUpperArm" },
|
|
19
|
+
{ "RightUpperArm", "RightHand" },
|
|
20
20
|
|
|
21
|
-
{"LeftUpperLeg", "RightUpperLeg"},
|
|
21
|
+
{ "LeftUpperLeg", "RightUpperLeg" },
|
|
22
22
|
|
|
23
|
-
{"UpperTorso", "RightUpperLeg"},
|
|
24
|
-
{"RightUpperLeg", "RightFoot"},
|
|
23
|
+
{ "UpperTorso", "RightUpperLeg" },
|
|
24
|
+
{ "RightUpperLeg", "RightFoot" },
|
|
25
25
|
|
|
26
|
-
{"UpperTorso", "LeftUpperLeg"},
|
|
27
|
-
{"LeftUpperLeg", "LeftFoot"},
|
|
26
|
+
{ "UpperTorso", "LeftUpperLeg" },
|
|
27
|
+
{ "LeftUpperLeg", "LeftFoot" },
|
|
28
28
|
|
|
29
29
|
-- Support weird R15 rigs
|
|
30
|
-
{"UpperTorso", "LeftLowerLeg"},
|
|
31
|
-
{"UpperTorso", "RightLowerLeg"},
|
|
32
|
-
{"LowerTorso", "LeftLowerLeg"},
|
|
33
|
-
{"LowerTorso", "RightLowerLeg"},
|
|
30
|
+
{ "UpperTorso", "LeftLowerLeg" },
|
|
31
|
+
{ "UpperTorso", "RightLowerLeg" },
|
|
32
|
+
{ "LowerTorso", "LeftLowerLeg" },
|
|
33
|
+
{ "LowerTorso", "RightLowerLeg" },
|
|
34
34
|
|
|
35
|
-
{"UpperTorso", "LeftLowerArm"},
|
|
36
|
-
{"UpperTorso", "RightLowerArm"},
|
|
35
|
+
{ "UpperTorso", "LeftLowerArm" },
|
|
36
|
+
{ "UpperTorso", "RightLowerArm" },
|
|
37
37
|
|
|
38
|
-
{"Head", "LeftUpperArm"},
|
|
39
|
-
{"Head", "RightUpperArm"},
|
|
38
|
+
{ "Head", "LeftUpperArm" },
|
|
39
|
+
{ "Head", "RightUpperArm" },
|
|
40
40
|
|
|
41
41
|
-- Basically every other part
|
|
42
|
-
{"HumanoidRootPart", "LeftUpperArm"},
|
|
43
|
-
{"HumanoidRootPart", "RightUpperArm"},
|
|
44
|
-
{"HumanoidRootPart", "LeftLowerArm"},
|
|
45
|
-
{"HumanoidRootPart", "RightLowerArm"},
|
|
46
|
-
{"HumanoidRootPart", "LeftLowerLeg"},
|
|
47
|
-
{"HumanoidRootPart", "RightLowerLeg"},
|
|
48
|
-
{"HumanoidRootPart", "LeftUpperLeg"},
|
|
49
|
-
{"HumanoidRootPart", "RightUpperLeg"},
|
|
50
|
-
{"HumanoidRootPart", "Head"},
|
|
51
|
-
{"HumanoidRootPart", "LeftFoot"},
|
|
52
|
-
{"HumanoidRootPart", "RightFoot"},
|
|
53
|
-
{"HumanoidRootPart", "LeftHand"},
|
|
54
|
-
{"HumanoidRootPart", "RightHand"},
|
|
55
|
-
{"HumanoidRootPart", "UpperTorso"},
|
|
56
|
-
{"HumanoidRootPart", "LowerTorso"},
|
|
42
|
+
{ "HumanoidRootPart", "LeftUpperArm" },
|
|
43
|
+
{ "HumanoidRootPart", "RightUpperArm" },
|
|
44
|
+
{ "HumanoidRootPart", "LeftLowerArm" },
|
|
45
|
+
{ "HumanoidRootPart", "RightLowerArm" },
|
|
46
|
+
{ "HumanoidRootPart", "LeftLowerLeg" },
|
|
47
|
+
{ "HumanoidRootPart", "RightLowerLeg" },
|
|
48
|
+
{ "HumanoidRootPart", "LeftUpperLeg" },
|
|
49
|
+
{ "HumanoidRootPart", "RightUpperLeg" },
|
|
50
|
+
{ "HumanoidRootPart", "Head" },
|
|
51
|
+
{ "HumanoidRootPart", "LeftFoot" },
|
|
52
|
+
{ "HumanoidRootPart", "RightFoot" },
|
|
53
|
+
{ "HumanoidRootPart", "LeftHand" },
|
|
54
|
+
{ "HumanoidRootPart", "RightHand" },
|
|
55
|
+
{ "HumanoidRootPart", "UpperTorso" },
|
|
56
|
+
{ "HumanoidRootPart", "LowerTorso" },
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
local R15_PARTS = {
|
|
60
|
-
"LeftUpperArm"
|
|
61
|
-
"RightUpperArm"
|
|
62
|
-
"LeftLowerArm"
|
|
63
|
-
"RightLowerArm"
|
|
64
|
-
"LeftLowerLeg"
|
|
65
|
-
"RightLowerLeg"
|
|
66
|
-
"LeftUpperLeg"
|
|
67
|
-
"RightUpperLeg"
|
|
68
|
-
"Head"
|
|
69
|
-
"LeftFoot"
|
|
70
|
-
"RightFoot"
|
|
71
|
-
"LeftHand"
|
|
72
|
-
"RightHand"
|
|
73
|
-
"UpperTorso"
|
|
74
|
-
"LowerTorso"
|
|
60
|
+
"LeftUpperArm",
|
|
61
|
+
"RightUpperArm",
|
|
62
|
+
"LeftLowerArm",
|
|
63
|
+
"RightLowerArm",
|
|
64
|
+
"LeftLowerLeg",
|
|
65
|
+
"RightLowerLeg",
|
|
66
|
+
"LeftUpperLeg",
|
|
67
|
+
"RightUpperLeg",
|
|
68
|
+
"Head",
|
|
69
|
+
"LeftFoot",
|
|
70
|
+
"RightFoot",
|
|
71
|
+
"LeftHand",
|
|
72
|
+
"RightHand",
|
|
73
|
+
"UpperTorso",
|
|
74
|
+
"LowerTorso",
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
local R6_NO_COLLIDES = {
|
|
78
|
-
{"Left Leg", "Right Leg"},
|
|
79
|
-
{"Head", "Right Arm"},
|
|
80
|
-
{"Head", "Left Arm"},
|
|
81
|
-
|
|
82
|
-
{"HumanoidRootPart", "Head"},
|
|
83
|
-
{"HumanoidRootPart", "Right Leg"},
|
|
84
|
-
{"HumanoidRootPart", "Right Arm"},
|
|
85
|
-
{"HumanoidRootPart", "Left Leg"},
|
|
86
|
-
{"HumanoidRootPart", "Left Arm"},
|
|
78
|
+
{ "Left Leg", "Right Leg" },
|
|
79
|
+
{ "Head", "Right Arm" },
|
|
80
|
+
{ "Head", "Left Arm" },
|
|
81
|
+
|
|
82
|
+
{ "HumanoidRootPart", "Head" },
|
|
83
|
+
{ "HumanoidRootPart", "Right Leg" },
|
|
84
|
+
{ "HumanoidRootPart", "Right Arm" },
|
|
85
|
+
{ "HumanoidRootPart", "Left Leg" },
|
|
86
|
+
{ "HumanoidRootPart", "Left Arm" },
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
function RagdollCollisionUtils.getCollisionData(rigType: Enum.HumanoidRigType)
|
|
@@ -130,8 +130,8 @@ function RagdollCollisionUtils.ensureNoCollides(character: Model, rigType: Enum.
|
|
|
130
130
|
local part0Name, part1Name = unpack(data)
|
|
131
131
|
|
|
132
132
|
local observable = RxBrioUtils.flatCombineLatest({
|
|
133
|
-
part0 = RxR15Utils.observeCharacterPartBrio(character, part0Name)
|
|
134
|
-
part1 = RxR15Utils.observeCharacterPartBrio(character, part1Name)
|
|
133
|
+
part0 = RxR15Utils.observeCharacterPartBrio(character, part0Name),
|
|
134
|
+
part1 = RxR15Utils.observeCharacterPartBrio(character, part1Name),
|
|
135
135
|
})
|
|
136
136
|
|
|
137
137
|
topMaid:GiveTask(observable:Subscribe(function(state)
|
|
@@ -155,5 +155,4 @@ function RagdollCollisionUtils.ensureNoCollides(character: Model, rigType: Enum.
|
|
|
155
155
|
return topMaid
|
|
156
156
|
end
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
return RagdollCollisionUtils
|
|
158
|
+
return RagdollCollisionUtils
|
|
@@ -7,6 +7,6 @@ local require = require(script.Parent.loader).load(script)
|
|
|
7
7
|
local AdorneeData = require("AdorneeData")
|
|
8
8
|
|
|
9
9
|
return AdorneeData.new({
|
|
10
|
-
IsMotorAnimated = false
|
|
11
|
-
RagdollSpringReturnSpeed = 20
|
|
12
|
-
})
|
|
10
|
+
IsMotorAnimated = false,
|
|
11
|
+
RagdollSpringReturnSpeed = 20,
|
|
12
|
+
})
|