How to set Diferent continous movements for different keys when held?

Im pretty new to Unreal and i’m a bit lost right now on how to achieve this. So, here’s the thing. I want one component of my actor blueprint to rotate in one direction when i hold a key, and in the opposite direction when i hold another key. So far i got it to rotate to the left when i hold “D”. The problem is i can’t take an additional branch from the tick event to build the nodes for the other key, and i don’t know how to do it.

Thanks in advance!

For what you want to do you should look into Axis mappings .

( some info about action and axis mappings in general: Input Action And Axis Mappings In UE4 - Unreal Engine)

In your project settings under ProjectSettings->Input->Bindings you can add Action and Axis mappings.

  • An action mapping will trigger when you press or release a key. (like you have the D node in your screenshot)
  • An axis mapping will fire with a value between 0 and 1. (so 0 would be not pressed at all, and 1 would be fully pressed)

Sou you should create an axis mapping to rotate left, and one to rotate right.

321598-axismappingprojectsettings.png

If you do that, you will be able find the event for that mapping in your blueprint and hook it up like this:

Worked great! Thank you so much!