Announcement

Collapse
No announcement yet.

Best way to track held buttons/keys?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Best way to track held buttons/keys?

    Hey guys, just a general question here. Is there a reliable way beyond Pressed/Released to determine whether or not a button is down? For example, I have added an ADS (Iron sights) system to my character, and added an ADS state to the state machine. I also have an ADS Walk State, which adds a little gun movement for when I'm moving around.

    The problem is sometimes the states don't get updated. Like I'll be walking and go into ADS a couple times, then stop, and go into ADS and it's playing the ADS Walk animation even though I'm stopped. It feels like I need to be checking all the buttons in Tick at all times and updating my IsAiming booleans that way. Is that possible/advisable? Thanks in advance for any advice.

    #2
    It's difficult to grasp where the issue lays without a visual of your statemachines and blueprints, but I think I get it.

    So are you asking how to go about fixing it or checking it to figure out why on your own?

    From the way it sounds, you may need a sort of automatically refreshing conditional check. Maybe from an event tick node to constantly check your booleans and be sure to cross check if a key is being pressed or released in order to correcr itself. It's hard to explain but anywhere is a start right?

    Help us community!

    Comment

    Working...
    X