From 128a065a45adfea3af39aab9f54f7a0d57547244 Mon Sep 17 00:00:00 2001 From: integraldx Date: Sat, 21 Dec 2024 12:11:01 +0900 Subject: [PATCH] fix: set rubber bouncy --- Assets/SWPPT3/Scripts/SoftbodyPhysics/SoftbodyGenerator.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Assets/SWPPT3/Scripts/SoftbodyPhysics/SoftbodyGenerator.cs b/Assets/SWPPT3/Scripts/SoftbodyPhysics/SoftbodyGenerator.cs index f11f794..755ac2d 100644 --- a/Assets/SWPPT3/Scripts/SoftbodyPhysics/SoftbodyGenerator.cs +++ b/Assets/SWPPT3/Scripts/SoftbodyPhysics/SoftbodyGenerator.cs @@ -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(); }