Fixing is endless

This commit is contained in:
ThomasCharester committed 2026-11-11 01:11:41 +03:00
1 parent c0dec163cd
commit 3ca9444333
45 files changed
+123468 -18592

No files matched your search

@@ -5,6 +5,7 @@ namespace Code.OfficeGame.BattleMode.Actions
{
public struct EntitySnapshot
{
public Vector3 BaseVelocity;
public Vector3 Position;
public Quaternion Rotation;
@@ -15,6 +16,7 @@ namespace Code.OfficeGame.BattleMode.Actions
{
return new EntitySnapshot
{
BaseVelocity = entityProperties.KinematicCharacterMotor.BaseVelocity,
Position = entityProperties.KinematicCharacterMotor.TransientPosition,
Rotation = entityProperties.KinematicCharacterMotor.TransientRotation,
AnimatorSnapshot = AnimatorSnapshot.GetSnapshot(entityProperties.animator),
@@ -26,7 +28,7 @@ namespace Code.OfficeGame.BattleMode.Actions
{
// 1. Возвращаем капсулу KCC
entityProperties.KinematicCharacterMotor.SetPositionAndRotation(snapshot.Position, snapshot.Rotation);
entityProperties.KinematicCharacterMotor.BaseVelocity = Vector3.zero;
entityProperties.KinematicCharacterMotor.BaseVelocity = snapshot.BaseVelocity;
snapshot.ControllerSnapshot.RestoreSnapshot(entityProperties.MovementController);