#turn h help
14 messages · Page 1 of 1 (latest)
I think you'd actually want to use flip_v
oh, thanks, but how do I change it based on the mouse position
you can take the global position of the mouse and subtract the global position of the sprite, then depending on the sign of the x-component you flip the sprite.
and how do i ge the mouse position
get_global_mouse_position()
why are you comparing the global mouse position to a fixed position? also you're comparing the whole vector, not just the x-component.
is there any other way??
get_global_mouse_position().x > global_position.x is what i would have done.
although i'm unsure which one of the two would have to be bigger, but it should be very obvoius when you try it out.