Closed ztc0611 closed 1 year ago
Hello,
The purpose of the var _base_radius is to calculate _base.size * _base.get_global_transform_with_canvas().get_scale() / 2
just at the start and saving the result.
By recalculating it every frame its purpose is defeated.
I thought of 4 better (imho) alternatives:
I think I did what you intended? Tell me if it's still wrong and I'll be on it.
If you have any method to handle window resizing which changes the scale of the joystick, the joystick ceases functioning once that runs. This fixes the issue and doesn't create any new ones as far as I can see. I don't think this has any performance hit, but if that is a concern I can modify the code to only rescale it based on a checkbox.