I am using a basic stamina system using components. While key press the character sprints and stamina drains. BUT, it will also drain on key press while standing still (not moving).
Any ideas on a fix? Thanks in advance.
(I still want to be able to drain stamina while jumping in place)
Maybe you could work it out with a simple “is sprint key pressed” boolean, based on the input. And to make sure, work it out with your actual velocity compared to a speed that would justify the stamina drian. The branch then could be adjusting some logic within your stamina component whatever is doing it.