ошибки поворота, прицела
This commit is contained in:
1 parent
202a894140
commit
da648df1d9
200 files changed
+31969
-629
No files matched your search
@@ -84,8 +84,8 @@ public class PlayerAttack : MonoBehaviour
|
||||
if (camFwd.sqrMagnitude > 0.001f)
|
||||
{
|
||||
attackDir = camFwd.normalized;
|
||||
// Поворачиваем персонажа лицом к направлению атаки (прицелу)
|
||||
transform.rotation = Quaternion.LookRotation(attackDir);
|
||||
// Быстро и плавно поворачиваем персонажа лицом к направлению атаки (прицелу)
|
||||
GetComponent<PlayerMovement>()?.SnapToAim(attackCooldown);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user