Health System

This commit is contained in:
ThomasCharester committed 2026-11-17 18:44:54 +03:00
1 parent 329cc98ade
commit cb05da5e89
87 files changed
+568550 -155362

No files matched your search

@@ -74,6 +74,15 @@ namespace Code.OfficeGame.BattleMode.Actions
stuggerActionData.KnockbackSpeed * tickDelta,
stuggerActionData.KnockbackDistance);
// Поворот противоположно направлению атаки за время отталкивания
Quaternion targetRotation = Quaternion.LookRotation(-stuggerActionData.KnockbackDirection, Vector3.up);
float t = stepDistance / stuggerActionData.KnockbackDistance;
Quaternion nextRotation = Quaternion.Slerp(
entity.KinematicCharacterMotor.TransientRotation,
targetRotation,
t);
entity.KinematicCharacterMotor.SetRotation(nextRotation);
stuggerActionData.KnockbackDistance -= stepDistance;
Vector3 step = stuggerActionData.KnockbackDirection * stepDistance;