When I press the sprint button when crouched I start moving at normal walk speed as if I was uncrouched. So far these are what I have for the blueprints.
The BP is fine, I couldn’t believe it doesn’t work and I created a fresh project exactly same as you did (besides that I used print string to tell me the result) - no issues
are you using same button somewhere else? Also try disabling “consume input” but normally with BP you provided - it’s been setup correctly (at least that one part from the screenshot)
I suspect your issue is the release of sprint key, the. EndSprint function, is setting the walk speed back to your default walk speed.
That’s what I assumed but didn’t wanted to type that as from what I understand - this happens by pressing, not releasing so I didn’t wanted to point that out although that was my guess to
There has to be a piece of code that smashes all other rules away and overwrites them
Hi there,
It seems your crouching cancels sprinting because if you press sprint while pressing crouch, the branch will always return true. Therefore, no sprinting.
Neither left shift or c is being used anywhere else, here is the End Sprint function if something is wrong with it.
That is not what I was referring to.
Quick couple of questions that I consider could help solve the issue:
- What is your EndSprint function doing?
- Does it have any conditions to limit its execution?
Here, take this:
Find the “WalkRun” Project and download it to see how I handled it with some additional functionality
It doesn’t prevent you from sprinting while croaching in its actual state but no worries - the only thing you need is same branch you used before:
And here’s the Result:
And also the full BP:
Hope this will help