I my continuing attempt to get a wallslide/jump thing happening in my 2D game I have had to switch to using a RayCasting method because the is_on_wall() isn’t very satisfactory.
So, my question is, if you flip the sprite that has a RayCasting2D node on it does the RayCast flip with it or does it continually face the in one direction. If not, is there any possible way in gdscript to flip the RayCast when the sprite does changes direction?
Ok,well, I never would’ve come up with that on my own . I also didn’t know you could run a bool check on flip_h - that took me by surprise. I won’t need it but good to know.
In fact, there was nowhere on the internet that I came up with any solution.
You can also modify the Scale property of your Raycast to achieve the same effect. Keeping the Y value unchanged, but change the Scale’s X between 1 or -1 depending on which way your character is facing.