How to handle actions (with action map) in cryengine 5.4 and above?

hello world :D

I tried to handle player inputs with action map like the same code in player.cpp and I added my action to defaultProfile.xml in player action map but no result I tried to
use CryLog method to log in console; but nothing happened :( I had done it in cryengine 5.3 because it has another method to do this can u guys help me how to handle
actions in cryengine 5.4 and 5.5 with new method?

and here is code :

Code: Select all

//Register the custom action [TEST] m_pInputComponent->RegisterAction("player"/*actionmap name (reveal file located in defualtconfig.xml*/, "shoot"/*action name*/, [this](int activationMode, float value) //we using it like this to handle action in current code and just with registering action //also we need to bind action { if (activationMode == eIS_Pressed) //action on press { CryLog("Pressed"); } if (activationMode == eIS_Released) //action on release { CryLog("Pressed"); } }); //you need to bind action m_pInputComponent->BindAction("player"/*action map name*/, "log"/*action name*/, eAID_KeyboardMouse/*input device*/, EKeyId::eKI_F/*input key*/);

Who is online

Users browsing this forum: No registered users and 2 guests