[Verse Enhanced Input] Inputs APIs are no longer sending input events

Summary

Both UnrealEngine.ControlInput & Verse.Input modules are not sending any input events when the InputMappingContext is added and the InputAction triggered by the player.

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

  • Create an entity and add a basic_interactable_component and the GameInputQAComponent:
GameInputQAComponent := class<final_super>(component) {
    @editable bUseDeprecatedAPI<public>:logic = false;
    @editable InputAction<public>:input_action(logic);
    @editable InputMappingContext<public>:input_mapping;

    OnSimulate<override>()<suspends>:void = {
        Interactable := Self.Entity.GetComponent[(/Verse.org:)SceneGraph.basic_interactable_component] or Err("SceneGraph.basic_interactable_component");

        Agent:agent = Interactable.SucceededEvent.Await();
        Player := player[Agent] or Err("[GameInputQAComponent]: Player required");

        if (Self.bUseDeprecatedAPI?) {
            PlayerInput := (/UnrealEngine.com:)ControlInput.GetPlayerInput[Player] or Err("Input.GetPlayerInput");

            PlayerInput.AddInputMapping(Self.InputMappingContext);
            InputEvents := PlayerInput.GetInputEvents(Self.InputAction);

            loop {
                Event:string = race {
                    (InputEvents.ActivationTriggeredEvent.Await(); "ActivationTriggered");
                    (InputEvents.ActivationCanceledEvent.Await(); "ActivationCanceled");
                    (InputEvents.DetectionBeginEvent.Await(); "DetectionBegin");
                    (InputEvents.DetectionOngoingEvent.Await(); "DetectionOngoing");
                    (InputEvents.DetectionEndEvent.Await(); "DetectionEnd");  
                };

                Print("[GameInputQAComponent(UnrealEngine.ControlInput)]: {Event}");
            };
        } else {
            PlayerInput := (/Verse.org:)Input.GetPlayerInput[Player] or Err("Input.GetPlayerInput");

            PlayerInput.AddInputMapping(Self.InputMappingContext);
            InputEvents := PlayerInput.GetInputEvents(Self.InputAction);

            loop {
                Event:string = race {
                    # Uses Sleep() to suprress LSP Error: `Expected async expression and only found immediate expression.`
                    (InputEvents.TriggerActivationEvent.Await(); Sleep(-1.0); "TriggerActivation");
                    (InputEvents.CancelActivationEvent.Await(); Sleep(-1.0); "CancelActivation");
                    (InputEvents.BeginDetectEvent.Await(); Sleep(-1.0); "BeginDetect");
                    (InputEvents.DetectionOngoingEvent.Await(); Sleep(-1.0); "DetectionOngoing");
                    (InputEvents.EndDetectEvent.Await(); Sleep(-1.0); "EndDetect");
                };

                Print("[GameInputQAComponent(Verse.Input)]: {Event}");
            };
        }
    };
};
  • Start the game
  • Interact with the entity and trigger the input you selected

Expected Result

We should see a output logs after the player presses the input.

Observed Result

Nothing happens.

Platform(s)

Windows 11 - 40.10-CL-52157884

The status of FORT-1087273 changed to ‘Needs Triage’. We’ve confirmed the issue and it’s waiting to be assigned to someone to fix it.