Skip to content

Commit

Permalink
fix: resolve the issue with touch controls not working properly with …
Browse files Browse the repository at this point in the history
…autopilot
  • Loading branch information
PavelZinchenko committed Feb 19, 2024
1 parent 6925bc8 commit ad2d1f3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public NodeState Evaluate(Context context)
_lastFrameId = context.FrameId;
_elapsedTime += context.DeltaTime;

return _elapsedTime >= _timeInterval ? NodeState.Success : NodeState.Running;
return _elapsedTime >= _timeInterval ? NodeState.Success : NodeState.Failure;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public BehaviorTreeController(ShipBehaviorTree behaviorTree, IScene scene, IShip
public void Update(float deltaTime)
{
_behaviorTree.Update(deltaTime);
_ship.Controls.DataChanged = false;
}

public class Factory : IControllerFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ protected override void OnUpdatePhysics(float elapsedTime)
}

Features.UpdatePhysics(elapsedTime, Collider);

UpdateSystems(elapsedTime);
Controls.DataChanged = false;
}

protected override void OnUpdateView(float elapsedTime)
Expand Down

0 comments on commit ad2d1f3

Please sign in to comment.