private void Interact() { var isLeftOfObject = player.PlayerTransform.position.x < currentInteractable.ObjectiveTransform.position.x; animationController.TurnCharacter(!isLeftOfObject); currentInteractable?.Interact(); //TODO: zero out velocity. make colliders at base of feet so it cannot be interacted while jumping }
public void UpdateInteraction() { if (player.InputDisabled || !player.IsGrounded) { return; } if (playerInput.IsInteractDown()) { currentInteractable?.Interact(); currentObjectiveInteractable?.Interact(); } }