@rbxts/falldown 1.1.8 → 1.2.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/out/index.d.ts +4 -0
- package/out/init.luau +12 -0
- package/package.json +1 -1
package/out/index.d.ts
CHANGED
|
@@ -47,6 +47,10 @@ export interface IActiveRagdoll {
|
|
|
47
47
|
* @see {@linkcode Falldown.VelocityMode}
|
|
48
48
|
*/
|
|
49
49
|
export declare class Falldown {
|
|
50
|
+
/**
|
|
51
|
+
* If `true`, players will have DevEnableMouseLock set to `false` when ragdolled, preventing shift-lock mode. This is necessary to avoid camera issues while ragdolled, but may affect player preference for shift-lock. Defaults to `true`.
|
|
52
|
+
*/
|
|
53
|
+
static DisableShiftLockOnRagdoll: boolean;
|
|
50
54
|
/**
|
|
51
55
|
* Enum used to represent how velocity should be distributed across a ragdolled character's body parts.
|
|
52
56
|
* @static
|
package/out/init.luau
CHANGED
|
@@ -377,6 +377,13 @@ do
|
|
|
377
377
|
function ActiveRagdoll:constructor(character, objectiveHeight, standFadeTime, humanoid, humanoidRootPart, leftTouchObj, rightTouchObj, jointDestructionInfo, bodypartGroupId, automaticDuration, exitMode, getupFront, getupBack)
|
|
378
378
|
self.Destroyed = Signal.new()
|
|
379
379
|
self.Ended = Signal.new()
|
|
380
|
+
if Falldown.DisableShiftLockOnRagdoll then
|
|
381
|
+
local player = Players:GetPlayerFromCharacter(character)
|
|
382
|
+
if player then
|
|
383
|
+
self._wasShiftLockEnabled = player.DevEnableMouseLock
|
|
384
|
+
player.DevEnableMouseLock = false
|
|
385
|
+
end
|
|
386
|
+
end
|
|
380
387
|
character.Destroying:Once(function()
|
|
381
388
|
self.CharacterDead = true
|
|
382
389
|
table.clear(self._jointDestructionInfo)
|
|
@@ -832,6 +839,9 @@ do
|
|
|
832
839
|
clonedCharacter:Destroy()
|
|
833
840
|
end)
|
|
834
841
|
end
|
|
842
|
+
if self._wasShiftLockEnabled ~= nil and self.Owner then
|
|
843
|
+
self.Owner.DevEnableMouseLock = self._wasShiftLockEnabled
|
|
844
|
+
end
|
|
835
845
|
PhysicsService:UnregisterCollisionGroup(self._bodypartGroupId)
|
|
836
846
|
self.Destroyed:Fire()
|
|
837
847
|
self.Destroyed:Destroy()
|
|
@@ -861,6 +871,7 @@ do
|
|
|
861
871
|
function Falldown:SetupCollisionGroup(bodyPartMap, bodypartGroupId)
|
|
862
872
|
PhysicsService:RegisterCollisionGroup(bodypartGroupId)
|
|
863
873
|
PhysicsService:CollisionGroupSetCollidable(bodypartGroupId, bodypartGroupId, false)
|
|
874
|
+
PhysicsService:CollisionGroupSetCollidable(bodypartGroupId, "Debris", false)
|
|
864
875
|
for partName, originalPart in bodyPartMap do
|
|
865
876
|
originalPart.CollisionGroup = bodypartGroupId
|
|
866
877
|
if partName ~= "HumanoidRootPart" then
|
|
@@ -1643,6 +1654,7 @@ do
|
|
|
1643
1654
|
end
|
|
1644
1655
|
end
|
|
1645
1656
|
end
|
|
1657
|
+
Falldown.DisableShiftLockOnRagdoll = true
|
|
1646
1658
|
Falldown.VelocityMode = {
|
|
1647
1659
|
RootOnly = 0,
|
|
1648
1660
|
AllEqual = 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/falldown",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A realistic ragdoll physics system for Roblox with smooth getup animations, collision management, and customizable velocity modes. Supports both R6 and R15 rigs with surface-aware positioning.",
|
|
5
5
|
"main": "out/init.luau",
|
|
6
6
|
"scripts": {
|