Enhanced Input System: Difference between revisions

From Unreal Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 30: Line 30:


</pre>
</pre>
3. The Enhanced Input System uses two main parts Input Actions and Input Mapping Context, Input Actions are the name
of your Input, like Shoot.
<P>
4. Create a new input action, By right clicking the content drawer, and selecting Input->Input Action
<P>
[[File:Input_Action.png]]
<p>
5.

Revision as of 19:33, 2 May 2025


The Enchant Input System is unreal's modern way to handle user input, instead of using the .ini files.
It features remapping, and abstraction of Direction which makes the keyboard act more like a joystick.
WASD movement, becomes 2D(X Positive and negative and Y positive and negative) for a total of four direction.

1. Enable the plugin if not already(Unreal 5.2+ example have it enabled already)

2. If using c++ You must also include "EnhancedInput" in your Source\<project_name>\<project_name>.Build.cs


using UnrealBuildTool;

public class inino0 : ModuleRules
{
	public inino0(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "EnhancedInput","UMG","GameplayAbilities" });
	}
}



3. The Enhanced Input System uses two main parts Input Actions and Input Mapping Context, Input Actions are the name of your Input, like Shoot.

4. Create a new input action, By right clicking the content drawer, and selecting Input->Input Action

5.