Viewport_size.x wasn't working for me, here's an alternative that did

I believe viewport_size.x was returning (0,0) so my character could never move right. I’m not sure why, I’m using the correct version of Godot and rewrote the code multiple times.

I replaced viewport_size.x with get_viewport_rect.size.x and that worked for me

Privacy & Terms