@quenty/ragdoll 15.23.4-canary.559.339cfa7.0 → 15.24.0-canary.0a5db80.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 +2 -10
- package/package.json +31 -31
- package/src/Client/Classes/RagdollCameraShakeClient.lua +64 -72
- package/src/Client/Classes/RagdollClient.lua +2 -1
- 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 +1 -1
- package/src/Server/Classes/Ragdoll.lua +1 -1
- package/src/Server/Classes/RagdollCameraShake.lua +3 -2
- package/src/Server/Classes/RagdollHumanoidOnDeath.lua +2 -2
- package/src/Server/Classes/RagdollHumanoidOnFall.lua +2 -1
- package/src/Server/Classes/Ragdollable.lua +7 -7
- package/src/Server/Classes/UnragdollAutomatically.lua +35 -37
- package/src/Server/Classes/UnragdollAutomaticallyConstants.lua +3 -3
- package/src/Server/RagdollBindersServer.lua +6 -6
- package/src/Server/RagdollService.lua +1 -1
- package/src/Shared/Classes/BindableRagdollHumanoidOnFall.lua +5 -3
- package/src/Shared/Classes/RagdollHumanoidOnFallConstants.lua +2 -2
- package/src/Shared/Classes/RagdollableBase.lua +1 -1
- package/src/Shared/Interfaces/RagdollableInterface.lua +8 -7
- package/src/Shared/RagdollServiceConstants.lua +2 -2
- package/src/Shared/Rigging/RagdollAdditionalAttachmentUtils.lua +22 -44
- package/src/Shared/Rigging/RagdollBallSocketUtils.lua +163 -163
- package/src/Shared/Rigging/RagdollCollisionUtils.lua +61 -60
- 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
|
@@ -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")
|
|
9
8
|
local RxBrioUtils = require("RxBrioUtils")
|
|
10
9
|
local RxR15Utils = require("RxR15Utils")
|
|
10
|
+
local Maid = require("Maid")
|
|
11
11
|
|
|
12
12
|
local RagdollCollisionUtils = {}
|
|
13
13
|
|
|
14
14
|
local R15_NO_COLLIDES = {
|
|
15
|
-
{
|
|
16
|
-
{
|
|
15
|
+
{"LowerTorso", "LeftUpperArm"},
|
|
16
|
+
{"LeftUpperArm", "LeftHand"},
|
|
17
17
|
|
|
18
|
-
{
|
|
19
|
-
{
|
|
18
|
+
{"LowerTorso", "RightUpperArm"},
|
|
19
|
+
{"RightUpperArm", "RightHand"},
|
|
20
20
|
|
|
21
|
-
{
|
|
21
|
+
{"LeftUpperLeg", "RightUpperLeg"},
|
|
22
22
|
|
|
23
|
-
{
|
|
24
|
-
{
|
|
23
|
+
{"UpperTorso", "RightUpperLeg"},
|
|
24
|
+
{"RightUpperLeg", "RightFoot"},
|
|
25
25
|
|
|
26
|
-
{
|
|
27
|
-
{
|
|
26
|
+
{"UpperTorso", "LeftUpperLeg"},
|
|
27
|
+
{"LeftUpperLeg", "LeftFoot"},
|
|
28
28
|
|
|
29
29
|
-- Support weird R15 rigs
|
|
30
|
-
{
|
|
31
|
-
{
|
|
32
|
-
{
|
|
33
|
-
{
|
|
30
|
+
{"UpperTorso", "LeftLowerLeg"},
|
|
31
|
+
{"UpperTorso", "RightLowerLeg"},
|
|
32
|
+
{"LowerTorso", "LeftLowerLeg"},
|
|
33
|
+
{"LowerTorso", "RightLowerLeg"},
|
|
34
34
|
|
|
35
|
-
{
|
|
36
|
-
{
|
|
35
|
+
{"UpperTorso", "LeftLowerArm"},
|
|
36
|
+
{"UpperTorso", "RightLowerArm"},
|
|
37
37
|
|
|
38
|
-
{
|
|
39
|
-
{
|
|
38
|
+
{"Head", "LeftUpperArm"},
|
|
39
|
+
{"Head", "RightUpperArm"},
|
|
40
40
|
|
|
41
41
|
-- Basically every other part
|
|
42
|
-
{
|
|
43
|
-
{
|
|
44
|
-
{
|
|
45
|
-
{
|
|
46
|
-
{
|
|
47
|
-
{
|
|
48
|
-
{
|
|
49
|
-
{
|
|
50
|
-
{
|
|
51
|
-
{
|
|
52
|
-
{
|
|
53
|
-
{
|
|
54
|
-
{
|
|
55
|
-
{
|
|
56
|
-
{
|
|
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
|
-
{
|
|
79
|
-
{
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
{
|
|
84
|
-
{
|
|
85
|
-
{
|
|
86
|
-
{
|
|
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,4 +155,5 @@ function RagdollCollisionUtils.ensureNoCollides(character: Model, rigType: Enum.
|
|
|
155
155
|
return topMaid
|
|
156
156
|
end
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
|
|
159
|
+
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
|
+
})
|
|
@@ -22,104 +22,104 @@ local Table = require("Table")
|
|
|
22
22
|
|
|
23
23
|
return Table.readonly({
|
|
24
24
|
NECK_LIMITS = AdorneeData.new({
|
|
25
|
-
UpperAngle = 45
|
|
26
|
-
TwistLowerAngle = -40
|
|
27
|
-
TwistUpperAngle = 40
|
|
28
|
-
FrictionTorque = 15
|
|
29
|
-
ReferenceGravity = 196.2
|
|
30
|
-
ReferenceMass = 1.0249234437943
|
|
31
|
-
})
|
|
25
|
+
UpperAngle = 45;
|
|
26
|
+
TwistLowerAngle = -40;
|
|
27
|
+
TwistUpperAngle = 40;
|
|
28
|
+
FrictionTorque = 15;
|
|
29
|
+
ReferenceGravity = 196.2;
|
|
30
|
+
ReferenceMass = 1.0249234437943;
|
|
31
|
+
});
|
|
32
32
|
|
|
33
33
|
WAIST_LIMITS = AdorneeData.new({
|
|
34
|
-
UpperAngle = 20
|
|
35
|
-
TwistLowerAngle = -40
|
|
36
|
-
TwistUpperAngle = 20
|
|
37
|
-
FrictionTorque = 750
|
|
38
|
-
ReferenceGravity = 196.2
|
|
39
|
-
ReferenceMass = 2.861558675766
|
|
40
|
-
})
|
|
34
|
+
UpperAngle = 20;
|
|
35
|
+
TwistLowerAngle = -40;
|
|
36
|
+
TwistUpperAngle = 20;
|
|
37
|
+
FrictionTorque = 750;
|
|
38
|
+
ReferenceGravity = 196.2;
|
|
39
|
+
ReferenceMass = 2.861558675766;
|
|
40
|
+
});
|
|
41
41
|
|
|
42
42
|
ANKLE_LIMITS = AdorneeData.new({
|
|
43
|
-
UpperAngle = 10
|
|
44
|
-
TwistLowerAngle = -10
|
|
45
|
-
TwistUpperAngle = 10
|
|
46
|
-
FrictionTorque = 0.5
|
|
47
|
-
ReferenceGravity = 196.2
|
|
48
|
-
ReferenceMass = 0.43671694397926
|
|
49
|
-
})
|
|
43
|
+
UpperAngle = 10;
|
|
44
|
+
TwistLowerAngle = -10;
|
|
45
|
+
TwistUpperAngle = 10;
|
|
46
|
+
FrictionTorque = 0.5;
|
|
47
|
+
ReferenceGravity = 196.2;
|
|
48
|
+
ReferenceMass = 0.43671694397926;
|
|
49
|
+
});
|
|
50
50
|
|
|
51
51
|
ELBOW_LIMITS = AdorneeData.new({
|
|
52
52
|
-- Elbow is basically a hinge; but allow some twist for Supination and Pronation
|
|
53
|
-
UpperAngle = 20
|
|
54
|
-
TwistLowerAngle = 5
|
|
55
|
-
TwistUpperAngle = 120
|
|
56
|
-
FrictionTorque = 0.5
|
|
57
|
-
ReferenceGravity = 196.2
|
|
58
|
-
ReferenceMass = 0.70196455717087
|
|
59
|
-
})
|
|
53
|
+
UpperAngle = 20;
|
|
54
|
+
TwistLowerAngle = 5;
|
|
55
|
+
TwistUpperAngle = 120;
|
|
56
|
+
FrictionTorque = 0.5;
|
|
57
|
+
ReferenceGravity = 196.2;
|
|
58
|
+
ReferenceMass = 0.70196455717087;
|
|
59
|
+
});
|
|
60
60
|
|
|
61
61
|
WRIST_LIMITS = AdorneeData.new({
|
|
62
|
-
UpperAngle = 30
|
|
63
|
-
TwistLowerAngle = -10
|
|
64
|
-
TwistUpperAngle = 10
|
|
65
|
-
FrictionTorque = 1
|
|
66
|
-
ReferenceGravity = 196.2
|
|
67
|
-
ReferenceMass = 0.69132566452026
|
|
68
|
-
})
|
|
62
|
+
UpperAngle = 30;
|
|
63
|
+
TwistLowerAngle = -10;
|
|
64
|
+
TwistUpperAngle = 10;
|
|
65
|
+
FrictionTorque = 1;
|
|
66
|
+
ReferenceGravity = 196.2;
|
|
67
|
+
ReferenceMass = 0.69132566452026;
|
|
68
|
+
});
|
|
69
69
|
|
|
70
70
|
KNEE_LIMITS = AdorneeData.new({
|
|
71
|
-
UpperAngle = 5
|
|
72
|
-
TwistLowerAngle = -120
|
|
73
|
-
TwistUpperAngle = -5
|
|
74
|
-
FrictionTorque = 0.5
|
|
75
|
-
ReferenceGravity = 196.2
|
|
76
|
-
ReferenceMass = 0.65389388799667
|
|
77
|
-
})
|
|
71
|
+
UpperAngle = 5;
|
|
72
|
+
TwistLowerAngle = -120;
|
|
73
|
+
TwistUpperAngle = -5;
|
|
74
|
+
FrictionTorque = 0.5;
|
|
75
|
+
ReferenceGravity = 196.2;
|
|
76
|
+
ReferenceMass = 0.65389388799667;
|
|
77
|
+
});
|
|
78
78
|
|
|
79
79
|
SHOULDER_LIMITS = AdorneeData.new({
|
|
80
|
-
UpperAngle = 110
|
|
81
|
-
TwistLowerAngle = -85
|
|
82
|
-
TwistUpperAngle = 85
|
|
83
|
-
FrictionTorque = 0.5
|
|
84
|
-
ReferenceGravity = 196.2
|
|
85
|
-
ReferenceMass = 0.90918225049973
|
|
86
|
-
})
|
|
80
|
+
UpperAngle = 110;
|
|
81
|
+
TwistLowerAngle = -85;
|
|
82
|
+
TwistUpperAngle = 85;
|
|
83
|
+
FrictionTorque = 0.5;
|
|
84
|
+
ReferenceGravity = 196.2;
|
|
85
|
+
ReferenceMass = 0.90918225049973;
|
|
86
|
+
});
|
|
87
87
|
|
|
88
88
|
HIP_LIMITS = AdorneeData.new({
|
|
89
|
-
UpperAngle = 40
|
|
90
|
-
TwistLowerAngle = -5
|
|
91
|
-
TwistUpperAngle = 80
|
|
92
|
-
FrictionTorque = 0.5
|
|
93
|
-
ReferenceGravity = 196.2
|
|
94
|
-
ReferenceMass = 1.9175016880035
|
|
95
|
-
})
|
|
89
|
+
UpperAngle = 40;
|
|
90
|
+
TwistLowerAngle = -5;
|
|
91
|
+
TwistUpperAngle = 80;
|
|
92
|
+
FrictionTorque = 0.5;
|
|
93
|
+
ReferenceGravity = 196.2;
|
|
94
|
+
ReferenceMass = 1.9175016880035;
|
|
95
|
+
});
|
|
96
96
|
|
|
97
97
|
-- R6
|
|
98
98
|
|
|
99
99
|
R6_NECK_LIMITS = AdorneeData.new({
|
|
100
|
-
UpperAngle = 30
|
|
101
|
-
TwistLowerAngle = -40
|
|
102
|
-
TwistUpperAngle = 40
|
|
103
|
-
FrictionTorque = 0.5
|
|
104
|
-
ReferenceGravity = 196.2
|
|
105
|
-
ReferenceMass = 1.4
|
|
106
|
-
})
|
|
100
|
+
UpperAngle = 30;
|
|
101
|
+
TwistLowerAngle = -40;
|
|
102
|
+
TwistUpperAngle = 40;
|
|
103
|
+
FrictionTorque = 0.5;
|
|
104
|
+
ReferenceGravity = 196.2;
|
|
105
|
+
ReferenceMass = 1.4;
|
|
106
|
+
});
|
|
107
107
|
|
|
108
108
|
R6_SHOULDER_LIMITS = AdorneeData.new({
|
|
109
|
-
UpperAngle = 110
|
|
110
|
-
TwistLowerAngle = -85
|
|
111
|
-
TwistUpperAngle = 85
|
|
112
|
-
FrictionTorque = 0.5
|
|
113
|
-
ReferenceGravity = 196.2
|
|
114
|
-
ReferenceMass = 1.4
|
|
115
|
-
})
|
|
109
|
+
UpperAngle = 110;
|
|
110
|
+
TwistLowerAngle = -85;
|
|
111
|
+
TwistUpperAngle = 85;
|
|
112
|
+
FrictionTorque = 0.5;
|
|
113
|
+
ReferenceGravity = 196.2;
|
|
114
|
+
ReferenceMass = 1.4;
|
|
115
|
+
});
|
|
116
116
|
|
|
117
117
|
R6_HIP_LIMITS = AdorneeData.new({
|
|
118
|
-
UpperAngle = 40
|
|
119
|
-
TwistLowerAngle = -5
|
|
120
|
-
TwistUpperAngle = 80
|
|
121
|
-
FrictionTorque = 0.5
|
|
122
|
-
ReferenceGravity = 196.2
|
|
123
|
-
ReferenceMass = 1.4
|
|
124
|
-
})
|
|
125
|
-
})
|
|
118
|
+
UpperAngle = 40;
|
|
119
|
+
TwistLowerAngle = -5;
|
|
120
|
+
TwistUpperAngle = 80;
|
|
121
|
+
FrictionTorque = 0.5;
|
|
122
|
+
ReferenceGravity = 196.2;
|
|
123
|
+
ReferenceMass = 1.4;
|
|
124
|
+
});
|
|
125
|
+
})
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
local require = require(script.Parent.loader).load(script)
|
|
6
6
|
|
|
7
|
-
local Players = game:GetService("Players")
|
|
8
7
|
local RunService = game:GetService("RunService")
|
|
8
|
+
local Players = game:GetService("Players")
|
|
9
9
|
|
|
10
10
|
local CharacterUtils = require("CharacterUtils")
|
|
11
11
|
local EnumUtils = require("EnumUtils")
|
|
@@ -461,7 +461,7 @@ function RagdollMotorUtils.promiseVelocityRecordings(character: Model, rigType:
|
|
|
461
461
|
local x, y, z = change:ToEulerAnglesXYZ()
|
|
462
462
|
|
|
463
463
|
local vector = newRootPartCFrame:VectorToWorldSpace(Vector3.new(x, y, z))
|
|
464
|
-
result.rotation[data] = vector
|
|
464
|
+
result.rotation[data] = vector/dt
|
|
465
465
|
end
|
|
466
466
|
end
|
|
467
467
|
|
|
@@ -9,12 +9,12 @@ local require = require(script.Parent.loader).load(script)
|
|
|
9
9
|
local Players = game:GetService("Players")
|
|
10
10
|
local RunService = game:GetService("RunService")
|
|
11
11
|
|
|
12
|
-
local CharacterUtils = require("CharacterUtils")
|
|
13
12
|
local Maid = require("Maid")
|
|
14
|
-
local RagdollMotorUtils = require("RagdollMotorUtils")
|
|
15
13
|
local RxBrioUtils = require("RxBrioUtils")
|
|
16
14
|
local RxInstanceUtils = require("RxInstanceUtils")
|
|
17
15
|
local RxR15Utils = require("RxR15Utils")
|
|
16
|
+
local RagdollMotorUtils = require("RagdollMotorUtils")
|
|
17
|
+
local CharacterUtils = require("CharacterUtils")
|
|
18
18
|
|
|
19
19
|
local RxRagdollUtils = {}
|
|
20
20
|
|
|
@@ -181,7 +181,7 @@ function RxRagdollUtils.runLocal(humanoid: Humanoid)
|
|
|
181
181
|
:Then(function(velocityReadings)
|
|
182
182
|
debug.profilebegin("initragdoll")
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
maid:GiveTask(RxRagdollUtils.suppressRootPartCollision(character))
|
|
185
185
|
maid:GiveTask(RxRagdollUtils.enforceHeadCollision(character))
|
|
186
186
|
maid:GiveTask(RxRagdollUtils.enforceHumanoidStateMachineOff(character, humanoid))
|
|
187
187
|
|