Something more fixed
This commit is contained in:
1 parent
7d236d14cd
commit
d810ea00b6
676 files changed
+176711
-316402
No files matched your search
@@ -29,6 +29,7 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
Vector3 targetPos = positionDecisionResult.Position;
|
||||
|
||||
Vector3 toTargetXZ = targetPos - startPos;
|
||||
toTargetXZ.y = 0f;
|
||||
|
||||
Debug.DrawLine(startPos, targetPos, Color.red, 5f);
|
||||
|
||||
@@ -126,12 +127,6 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
entity.KinematicCharacterMotor.SetRotation(nextRot);
|
||||
StopMovementAndFinish(movementController);
|
||||
|
||||
KinematicCharacterSystem.Simulate(
|
||||
tickDelta,
|
||||
KinematicCharacterSystem.CharacterMotors,
|
||||
KinematicCharacterSystem.PhysicsMovers
|
||||
);
|
||||
|
||||
if (movementActionData.CurrentFrame >= movementActionData.TotalFrames || angle <= 0.5f)
|
||||
{
|
||||
entity.KinematicCharacterMotor.SetRotation(positionDecisionResult.Rotation);
|
||||
@@ -147,7 +142,7 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
entity.KinematicCharacterMotor.SetRotation(positionDecisionResult.Rotation);
|
||||
StopMovementAndFinish(movementController);
|
||||
battleActionData.Finished = true;
|
||||
Debug.Log("Wrong index");
|
||||
Debug.Log($"Corners {movementActionData.Corners == null} || Wrong index {movementActionData.CurrentCornerIndex >= movementActionData.Corners?.Length}");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -175,11 +170,6 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
entity.KinematicCharacterMotor.SetRotation(positionDecisionResult.Rotation);
|
||||
StopMovementAndFinish(movementController);
|
||||
KinematicCharacterSystem.Simulate(
|
||||
tickDelta,
|
||||
KinematicCharacterSystem.CharacterMotors,
|
||||
KinematicCharacterSystem.PhysicsMovers
|
||||
);
|
||||
|
||||
battleActionData.Finished = true;
|
||||
Debug.Log("Last corner");
|
||||
@@ -216,12 +206,6 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
movementController.SetInputs(ref aiInputs);
|
||||
|
||||
KinematicCharacterSystem.Simulate(
|
||||
tickDelta,
|
||||
KinematicCharacterSystem.CharacterMotors,
|
||||
KinematicCharacterSystem.PhysicsMovers
|
||||
);
|
||||
|
||||
Vector3 postMovePos = movementController.Motor.TransientPosition;
|
||||
Vector3 toFinal = movementActionData.Corners[^1] - postMovePos;
|
||||
toFinal.y = 0f;
|
||||
|
||||
Reference in new issue
Block a user