unity – Unwated delay in player controller FixedUpdate compared to enemy

I’m making a mobile game that uses rigidbodies to move the player and enemies. I am applying forces to those rigidbodies on ever fixed update cycle.

To handle touches, I have created a TouchManager script. The game UI (and the joystick) is handled by a GameUI script that listens to the touches of the touch managing script. Then, the PlayerController script listens to any updates to the joystick from the game ui script, and converts changes to the joystick to actual movement.

This has created a problem where there is a consistent cycle delay (about 2-4 cycles) between input and execution every few cycles (FixedUpdate cycles).

For example: input will be processed on cycle 1, but movement inside FixedUpdate will be called for cycles 3, 4, 5. Then, no movement until again cycles 8, 9, 10 and so on.
This gap in cycles is the problem. The intention is for input to be processed on cycle 1, and at the latest, on cycle 2, movement be applied to the rigidbody without skipping cycles (2, 3, 4, 5, 6 and so on without any gaps, until there is no input).

Below, you can see my code separated in individual scripts.
Note: TouchData is a custom structure that stores all the information a touch provides (initial and latest touch position on screen).


using System;
using UnityEngine.EventSystems;

public class TouchManager : MonoBehaviour {
    public static event Action<TouchData> OnTouch = delegate{};
    public static event Action<TouchData> OnTouchEnd = delegate{};
    public static List<TouchData> Touches = new List<TouchData>();
    void Update() {
        TouchData data;
        foreach(Touch touch in Input.touches) {
            if (touch.phase == TouchPhase.Began) {
                data = new TouchData(){
                    TouchID = touch.fingerId,
                    StartPoint = touch.position,
                    EndPoint = touch.position,
                    touchedUI = CheckUITouch(touch.fingerId),
                OnTouch(data); //GameUI uses this information
            } else if ... //the rest of the phases are processed in a similar fashion


using System;
using UnityEngine;
using UnityEngine.UI;

public class GameUI : MonoBehaviour {
    public static event Action<Vector3> JoystickMoved = delegate{};
    void Start() {
        TouchManager.OnTouch += HandleTouch;

    public void HandleTouch(TouchData touchData) {

    public void HandleJoystick(TouchData touchData) {
        //several checks to see if the current touch is the correct
        //touch related with joystick movement
        if (joystickTouchID == touchData.TouchID) {
            //knobPos is a Vector3 that is the direction of the force applied to the
            //player rigidbody in the next script
            JoystickMoved(knobPos); //PlayerController then uses this information


using UnityEngine;
using System;

public class PlayerController : MonoBehaviour {
    void Awake() {
        GameUI.JoystickMoved += MovePlayer;

    void FixedUpdate() {
        _rigidbody.AddForce(moveTarget * moveSpeed * Time.deltaTime, ForceMode2D.Impulse);
        moveTarget = Vector3.zero;

    private void MovePlayer(Vector3 pos) {
        moveTarget = pos.normalized;

Am I right to assume that this way of doing things, is causing my player to “lose” fixed update cycles and present with gaps in the log?

If using event Action is indeed causing the cycle gaps, how could I solve this without processing all touches inside the player controller? In other words, what is an elegant way of solving the cycle gap problem I am facing?

Thank you for your time.