Hello everyone! Perhaps someone can help me.
I’m working on creating a movement component for a pawn. The following logic needs to be implemented:
When the “Up” key is pressed, the pawn should move forward; when the key is released, the pawn should continue moving until I press the “Down” key.
How can this be done using enhanced input and C++?
Hey @ImmortaHopeless . I hope this help you out. First you will have to setup enhanced input for your pawn. You can find youtube tutorial or following documentation can help you.
Once your pawn/player controller can receive input, for c++ easiest would be to have a bool when set to true tick function would add world position to the pawn. Now when up is pressed you set it to true and when down is pressed you set it to false.
Another way to do it would be to create a function that can be called in blueprint. This function can start/stop timer events which would add world position in blueprint.