InputComponent.BindAction() InputEvent.Repeat delayed
See original GitHub issueThe following results in the debug message being displayed as soon as the key is pressed:
public static class ObjectOrientedDesign
{
private static Player _player;
public static void OnBeginPlay()
{
Debug.AddOnScreenMessage(-1, 3.0f, Color.LightGreen, MethodBase.GetCurrentMethod().DeclaringType + " system started!");
Engine.AddActionMapping("TestInput", Keys.W);
_player = new Player(nameof(Player));
}
public static void OnEndPlay() => Debug.ClearOnScreenMessages();
}
public class Player : Actor
{
public Player(string name = null) : base(name)
{
Debug.AddOnScreenMessage(-1, 3.0f, Color.Orange, name);
SetEnableInput(World.GetFirstPlayerController(), true);
InputComponent.BindAction("TestInput", InputEvent.Pressed, TestInput);
}
public static void TestInput() => Debug.AddOnScreenMessage(-1, 0.1f, Color.Aqua, $"Input {World.RealTime}");
}
Changing InputEvent type to Repeat results in a noticeable delay of around 1-1.5 secs
public Player(string name = null) : base(name)
{
Debug.AddOnScreenMessage(-1, 3.0f, Color.Orange, name);
SetEnableInput(World.GetFirstPlayerController(), true);
InputComponent.BindAction("TestInput", InputEvent.Repeat, TestInput);
}
Should the input system be taking this long to trigger the event?
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
How to use "IE_Repeat" EInputEvent for Mouse Buttons
I have the following: InputComponent->BindAction(“Drag”, IE_Pressed, this, &AAbatronPlayerController::OnDragStarted); InputComponent->BindAction ...
Read more >Setting Up Inputs
In the Components tab, click Add(+), then from the drop down search for and select Spring Arm. · Repeat step 1, but search...
Read more >WTF Is? Input: Is Repeat in Unreal Engine 4 ( UE4 ) - YouTube
What is the Input: Is Repeat Node in Unreal Engine 4 Source Files: ... UE4 Tutorial - For Each Loop With Delay. Aurora...
Read more >Binding Input in C++ with Unreal Engine 4 - Unrealistic
Bind to an Action Input using the BindAction() function on UInputComponent . It takes an input identifier name, an event type, ...
Read more >Unreal input action. I have been at it for a few days referri
I'm trying to read input in a blueprint, but input events don't fire. ... Bind to an Action Input using the BindAction() function...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have submitted a bug report with proposed improvements. To me it would make a lot of sense as it would allow a character to be controlled by input events without ticking while preserving compatibility
Also just looking through some of the Framework methods, would be nice if for anything that just takes a ref to return to as a void we could have a corresponding non void convenience method like so: