[Verse Enhanced Input] 250.0ms delay before the InputEvents are received

Summary

Verse Enhanced Input InputEvents are received after a 250.0ms delay while CRD_InputTrigger.PressedEvent happens instantly

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

  • Place a InputTrigger Device, and set:
    • Input Type → Standard Action
    • StandardInput → Fire
  • In verse add the Character.RangedWeaponMapping and GetInputEvents from IA_WeaponPrimary

Expected Result

CRD_InputTrigger.PressedEvent and Verse InputEvents should happen at the same time or even before the InputTrigger event

Observed Result

Verse InputEvents are delayed by ~250.0ms

Platform(s)

Windows 11 - 37.50-CL-46578011

Additional Notes

Verse

using { /UnrealEngine.com }
using { /Fortnite.com }
using { /Fortnite.com/Playspaces }
using { /Verse.org }
using { /Verse.org/Assets }
using { /Verse.org/SceneGraph }
using { /Verse.org/Simulation }

GameInputComponent := class<final_super>(component) {
    @editable CRD_InputTrigger<public>:Devices.input_trigger_device;
    @editable IA_WeaponPrimary<public>:input_action(logic);

    OnSimulate<override>()<suspends>:void = {
        Sleep(5.0);

        PlayerInput := ControlInput.GetPlayerInput[Self.Entity.GetPlayspaceForEntity[].GetPlayers()[0]] or Err("");

        PlayerInput.AddInputMapping(Input.Character.RangedWeaponMapping);
        InputEvents := PlayerInput.GetInputEvents(Self.IA_WeaponPrimary);

        race {
            loop {
                Agent := Self.CRD_InputTrigger.PressedEvent.Await();

                Print("[{Simulation.GetSimulationElapsedTime()}]: CRD_InputTrigger.PressedEvent");
            };

            loop {
                Agent := InputEvents.ActivationTriggeredEvent.Await();

                Print("[{Simulation.GetSimulationElapsedTime()}]: IA_WeaponPrimary.ActivationTriggeredEvent");
            };

            loop {
                Agent := InputEvents.ActivationCanceledEvent.Await();

                Print("[{Simulation.GetSimulationElapsedTime()}]: IA_WeaponPrimary.ActivationCanceledEvent");
            };

            loop {
                Agent := InputEvents.DetectionBeginEvent.Await();

                Print("[{Simulation.GetSimulationElapsedTime()}]: IA_WeaponPrimary.DetectionBeginEvent");
            };

            loop {
                Agent := InputEvents.DetectionOngoingEvent.Await();

                Print("[{Simulation.GetSimulationElapsedTime()}]: IA_WeaponPrimary.DetectionOngoingEvent");
            };

            loop {
                Agent := InputEvents.DetectionEndEvent.Await();

                Print("[{Simulation.GetSimulationElapsedTime()}]: IA_WeaponPrimary.DetectionEndEvent");
            };
        };
    };
};

Hey there! Thanks for the bug report.

The latency that you are experiencing is network latency. Since input (you, pressing buttons on your controller/keyboard) only exists on the local client, and Verse code is running on the server, there will always be “round trip” input latency.

Unfortunately there is no workaround at this time.

Thanks,
Ben

Hello,

That can’t be right. I was on 10 ping when doing this experiment, if this was actual network latency, shouldn’t the input trigger also be delayed?

Moreover there’s also a little glitch that allows you to send that input event almost as fast as the input trigger so I do think this is a bug and not network latency.

2 Likes

FORT-991816 has been ‘Closed’. This is working as intended by design.

Sorry to interrupt but I was able to reproduce this issue on my side.
I ran the provided code on a brand new map and the results were the same.

My client ping is around 0-3ms and the function took around 1/4 of a second (0.25s).
In the other hand, using the input triggers - my function fired immediately without the 0.25s delay.

Something seems very off for me.

1 Like

This is the same on my side (my ping is 3ms). Can you please take a look at this once again? @BenjaFriend22

1 Like

@BenjaFriend22 Could you take a second look at this? ^^

Bump

Hello, this is critical. @Flak can you please take a look, as we do not agree with it.

Using this code, not only is their input lag of 250 ms, it is also triggering twice??

I do not think this just round trip input latency.

2 Likes

@Flak bump ^^

Sorry, why was this issue closed? Can we have a member of staff confirm that a 250ms delay on input events is “working as intended by design”, especially after clear counter examples have been provided? Because if that’s the case, then clearly its time to rethink the design :skull:

1 Like

it triggers twice for keypress and lift off actions, so either subscribing to a function then exiting if the logic payload is false or storing the payload for the await and tying the following code to the logic result being true (for keypress)

Bump
I’m also getting an ≅ 250 ms delay, and I’m on 130 ping.