Bug whith relative location of camera

Hello i’ve just create a new BP character, and i have a little problem with it:


I wrote his blueprint to make it able to crouch. (I just down the camera by 50 unit when i press the button and its up when i release it).


But here is the problem: Each time i press the button, the character move to one unit on the X axis… I can’t figure out why… Is it a bug?
It’s just a default Character BP with this code…
I made the capsule box visible and show the world position of the camera to let you see the problem…

I was able to recreate your problem locally.

Here is the state of the blueprint with similar behavior you are describing.

I suspected you are your accidentally adding the Camera.GetForwardVector() every single time the Crouch event is thrown. I removed that from your code and the crouch behavior appeared to be fixed.


Yes ! It was that haha !
Thanks oldhighscore :wink: