void FixedUpdate() { Path newPath = treeRoot.Evaluate(this); currentPath = newPath ?? currentPath; behaviour.ApplyInput(stateMachine.Update()); }
void Update() { // every frame, grab user input and apply it to this obj's carbehaviour float acceleration = Input.GetAxisRaw("Vertical"); float turn = Input.GetAxisRaw("Horizontal"); cb.ApplyInput(new CarInput { acceleration = acceleration, turn = turn }); }