I want to mirror flip my character when changing direction whitout using animations. Any help? Thanks
It does not work... i get this error...
Invalid call. Nonexistent function 'setfliph' in base 'KinematicBody2D (playerscript.gd)'.
If i write just fliph i get
Invalid call. Nonexistent function 'fliph' in base 'KinematicBody2D (playerscript.gd)'.
Sprite has a flip_h and a flip_v property. You can just toggle them true/false when you change direction.
Maybe worth adding as a technical note, flipping also gets achieved when you set scaling values to -1.
Another note, try to manage the visual nodes (like sprites) separated of the interactive ones (like bodies).
In case of using scales, some bodies may not like it or will directly revert it when processed (at least on 2.1, I have not tested 3 yet).
So, scale the visual and look for the best way to treat the main nodes (like centring or resizing shapes).
You're trying to call set_flip_h() on the KinematicBody2D. Note that above, I said that the Sprite node has these methods. You need to do something like:
Oh right... Thank You!
BTW i like your YouTube channel ;)