For anyone coming along wondering about canceling inputs, it definitely isn’t possible in BP. The FInputCancelAction pictured above is only used for combo actions. Below is the only place in the entire code base that it’s used
In C++ you might be able to do something with UEnhancedPlayerInput::FindOrAddActionEventData and specifically the FInputActionInstance that it adds, but I haven’t tried it myself.
Hey there @rokenrock! Depending on your modifiers, the only way for a Hold type input action to output canceled is if your hold doesn’t make it to the hold timer threshold and is released. It should output completed once it holds however. Hold and release works similarly but won’t use complete until release.
Yeah I can’t find anything either. There doesn’t seem to be a way to prematurely cancel a specific action through BP. InputCancelAction really is a mystery.
In the end I just made a basic system to allow me to tell when it was finished and cancelled based on a variable length of hold time. This is better anyways since now I can have multiple hold durations, but I still wonder what InputCancelAction can be used by…
Understandable! I’d usually recommend post processing inputs that aren’t meant to always run after the fact anyway as it’s more flexible than trying to stop the input directly. Though I agree, I’m not sure the use case for the cancel action, as I don’t even have an entry for it in a base project.
I agree, the Hold trigger should fire the Completed event when the key is released, but it doesn’t. It fires it right after you start holding… which actually makes sense if you think about it. Anyway, cheers!