This commit is contained in:
Sveske Juice 2024-02-03 21:37:43 -08:00
parent 629fe00866
commit 434c2e84cf
1 changed files with 0 additions and 2 deletions

View File

@ -243,14 +243,12 @@ public class RopeSimulator : MonoBehaviour
if (overshoot > pullAnimationOvershootThreshold) if (overshoot > pullAnimationOvershootThreshold)
{ {
float startDot = Vector2.Dot((start.position - rope.points[1].position).normalized, start.playerInput.movement); float startDot = Vector2.Dot((start.position - rope.points[1].position).normalized, start.playerInput.movement);
Debug.Log($"player 1 dot: {startDot}");
if (startDot > 0.35f) if (startDot > 0.35f)
{ {
start.playerAnimationHandler.animator.SetBool("IsPulling", true); start.playerAnimationHandler.animator.SetBool("IsPulling", true);
} }
float endDot = Vector2.Dot((end.position - rope.points[rope.points.Count - 2].position).normalized, end.playerInput.movement); float endDot = Vector2.Dot((end.position - rope.points[rope.points.Count - 2].position).normalized, end.playerInput.movement);
Debug.Log($"player 2 dot: {endDot}");
if (endDot > 0.35f) if (endDot > 0.35f)
{ {
end.playerAnimationHandler.animator.SetBool("IsPulling", true); end.playerAnimationHandler.animator.SetBool("IsPulling", true);