Skip to content

Commit

Permalink
fix: set rubber bouncy
Browse files Browse the repository at this point in the history
  • Loading branch information
integraldx committed Dec 21, 2024
1 parent 55b0075 commit 128a065
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Assets/SWPPT3/Scripts/SoftbodyPhysics/SoftbodyGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -865,15 +865,20 @@ public void FixedUpdate()
if (PlayerStates == SoftStates.Rubber && _isJumpKey == true)
{
IsRubberJump = true;
_physicMaterial.bounciness = 1;
_physicMaterial.bounceCombine = PhysicMaterialCombine.Maximum;
}
else
{
IsRubberJump = false;

_physicMaterial.bounciness = 0;
_physicMaterial.bounceCombine = PhysicMaterialCombine.Minimum;
}

if (IsRubberJump && SetDirty)
{
YReflect();
// YReflect();
SoftbodyJump(_script.RubberJump);
ResetDirty();
}
Expand Down

0 comments on commit 128a065

Please sign in to comment.