I’ve made head bobbing on sprint by toturials.
The problem is that camera stat shake when I press Shift wnen I don’t move my character.
I guess that the problem is in “Sprint Speed” which become activated when I press shift and it doesn’t matter if moving character or not.
I also tried to make something like if I press W then IsRunning = True, if W unpressed then IsRunning = False but there is another problem, camera don’t shake if I press Shift before W.
Can you help me to solve this question? I tried everything based on my experience and I got a headache
I believe the simplest way to fix this would be to also add W+Shift to the Sprint input binding’s keys. By this I mean to select W as the key and then click the checkbox that says “Shift” beside it. This should fix the issue you’re encountering. If this doesn’t work, please let me know and I’ll try to figure out a better solution.
Unfortunately it did not work. I’ve also made node “Print string” to check what is going on so I realised that when I press W and then Shift nothing happens and when I press Shift and then W character become sprinting and he stays in this condition while I’m holding shift no matter with “W” or not. Camera is shaking also all the time afte that manipulations.
I’ve found the solution in this topic How do I prevent the character from sprinting when the stamina value is 0? - Character & Animation - Unreal Engine Forums
So I made similarly like with stamina and there is no need to make W+Shift input binding’s keys, just shift, but it also works with W+Shift
There is my blueprint of camera bobbing while sprinting maybe it can help someone else. It works perfect, when I hold Shift nothing happens but when I also press W camera become bobbing and vice versa.