Open Fossean1 opened 1 month ago
@Fossean1 could you please explain how it starts to work incorrectly. I took the example and set the analog_bg to 2x scale and it seems to work as expected.
@britzl sure 🙂. Here is the problem based on an example in the "onscreen gui" project. If you make the "analog" node a parent for the "analog_bg" node and zoom in/out the "analog_bg" node, the "analog" node moves incorrectly relative to the cursor.
https://github.com/britzl/defold-input/assets/53948838/df6db1f8-00af-4458-bf1d-5dd39716c249
Ah, ok, I see. The solution would be to somehow take the aggregated scale of the node and parent nodes into account when moving the node.
If you change the scale of the parent element of the analog stick, it starts to work incorrectly.