@rbxts/falldown 1.1.0 → 1.1.1

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.
Files changed (2) hide show
  1. package/out/init.luau +4 -3
  2. package/package.json +1 -1
package/out/init.luau CHANGED
@@ -575,6 +575,7 @@ do
575
575
  local gDot = gravity:Dot(groundNormal)
576
576
  local _arg0_1 = groundNormal * gDot
577
577
  local downhill = gravity - _arg0_1
578
+ local isSloped = downhill.Magnitude >= 0.05
578
579
  if downhill.Magnitude < 1e-3 then
579
580
  downhill = Vector3.new(0, 0, 1)
580
581
  end
@@ -594,7 +595,7 @@ do
594
595
  if along.Magnitude < 1e-3 then
595
596
  along = downhill
596
597
  end
597
- if along:Dot(downhill) < 0 then
598
+ if isSloped and along:Dot(downhill) < 0 then
598
599
  along = along * (-1)
599
600
  end
600
601
  return along.Unit
@@ -876,7 +877,7 @@ do
876
877
  local _cFrame_2 = rightLeg.CFrame
877
878
  local _cFrame_3 = CFrame.new(0, -rightLeg.Size.Y / 2, 0)
878
879
  local endPos = _:Lerp((_cFrame_2 * _cFrame_3).Position, 0.5)
879
- local height = (primaryPos - endPos).Magnitude
880
+ local height = math.abs(primaryPos.Y - endPos.Y)
880
881
  humanoid:ChangeState(Enum.HumanoidStateType.Physics)
881
882
  local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid)
882
883
  local getupFrontTrack = if getupFront then animator:LoadAnimation(getupFront) else nil
@@ -1125,7 +1126,7 @@ do
1125
1126
  local _cFrame_2 = rightFoot.CFrame
1126
1127
  local _cFrame_3 = CFrame.new(0, -rightFoot.Size.Y / 2, 0)
1127
1128
  local endPos = _:Lerp((_cFrame_2 * _cFrame_3).Position, 0.5)
1128
- local height = (primaryPos - endPos).Magnitude
1129
+ local height = math.abs(primaryPos.Y - endPos.Y)
1129
1130
  humanoid:ChangeState(Enum.HumanoidStateType.Physics)
1130
1131
  local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid)
1131
1132
  local getupFrontTrack = if getupFront then animator:LoadAnimation(getupFront) else nil
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/falldown",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
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": {