Bug whith relative location of camera

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


:frowning:

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).


:slight_smile:

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…

https://zupimages.net/viewer.php?id=20/01/umzj.png

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.

:cool:

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