I want to create an examine mechanic. For example, the player sees a picture and picks it up, and by clicking the right mouse button can rotate it. I ve seen tutorials on how to do that with blueprints, but I can’t find much information about how to do that in C++. I saw something about FKey and ActionEvents on the documentation, but nothing on how to use them. One possible solution that I’ve found is to remap the mapping context but it seems unnecessary for something that can likely be done more delicate. Its easy on bp just type Mouse X , Mouse Y and Right Mouse Button and with some extra steps the mechanic is ready.
Here is a good basic start on using enhanced input in C++. It lacks detail on action events but gets the process started. You can ask more questions once you have your feet wet.
The basics are:
Create DataAssets for the keys
Create a Context asset to define the actual keys to use
Create a class to hold pointers to the dataassets (so C++ can find them)
Create a SetupPlayerInputComponent to actually capture the keys
From there, you’ll develop the functions to do the heavy lifting of your examine application.
I know the basics of enhanced input if you are referring to that. I will take a look tho on what you sent me because want to further expand my knowledge on some more advanced stuff like modifiers and triggers.
What I am referring tho is keyboard events like the screenshot below!
OK, thank you very much! That’s actually true, I looked everywhere but Input Component. I thought there was a different class that did that separately that handled that input. Silly me…