How to move up and down using keyboard keys a pawn class object on UE5.2

Hello,
My question is simple, but so far I couldn’t find any answer.
I would like to be able to control a pawn class object (static mesh) to move it up (using “U” key) and down (using “J” key).
I looked here and on internet and I couldn’t find any answer for UE5.2.
I tried to create my own game mode, IA and IMC and a specific BP containing the staticmesh I want to control, and after having override the game mode by the onw I created, and changed the default pawn class.
In the Event Graph of the BP containing the staticmesh I want to control, when I add Events for the key U or the IA I created and when I play in simulation, it seems that when I press U, the press action is not detected. I confirmed it using print string linked to “Pressed”.
I suppose that I have all the elements but not in the right order or configuration.
Does somebody could explain me how to realize this simple task (move Up and Down of a spawn class object using U and J keys)?
If you know a youtube video explaining this, may I ask you to share its link?

Important: I am using UE5.2 and thus only Enhanced Input Actions and Input Mapping Contexts can be used)

1 Like

Hi there
Welcome to Unreal universe.
You look like you just installed the engine :slight_smile:
Here is a video I just did to show you how to do what you want to achieve.
good luck!

1 Like

Dear Mr. ELDANY,

My apologizes for the late contact. I just read your reply today.
Thank you for having taken time to create a video to explain me.
I am indeed new in UE; I studied various things in UE but controls are new for me. Your tutorial worked very well and helped me to understand better how to use the class and gamemode.
Again, let me thank you for your time and explanations.
Best regards

1 Like

Glad to help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.