Hold input action completing even though button held down

I followed a tutorial on how to implement a hold button. However when i do it the “complete” action fires even when button is held down. Attached are screen shots.



What am i doing wrong?

Maybe you are doing it wrong, Hold is for input like hold the button down for certain period of time until action takes place, for crouching i don’t see the reason to use hold.


This how i use hold and why, When i press “Z” on my keyboard it removes last spawned actor, but if i hold “Z” for 0,5 seconds it deletes all the actors i have spawned.

For crouching i use this method :


hope this will help you.

Thanks for the input and I can see what you are saying.
I would like my crouch process to a hold rather than a toggle. It is for traversal purposes and there will be consequences for un-crouching at the wrong time.
is there a better method for these circumstances?

My input system is hold system is not toggle, but for standing in wrong place you have to do additional coding for example: cast a sphere trace from your character up vector to check if there’s enough space for your character to stand up if there’s no hit on the line trace that means you can stand up, if it hits that means there’s something above your head.

Solution turns out to be using the “Set Capsule Half Height” rather than trying to adjust the world position of the player.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.