Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect offset of analog stick when parent is scaled #40

Open
Fossean1 opened this issue Mar 20, 2024 · 3 comments
Open

Incorrect offset of analog stick when parent is scaled #40

Fossean1 opened this issue Mar 20, 2024 · 3 comments

Comments

@Fossean1
Copy link

If you change the scale of the parent element of the analog stick, it starts to work incorrectly.

@britzl
Copy link
Owner

britzl commented Mar 25, 2024

@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.

@Fossean1
Copy link
Author

@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.
image

analog_stick_problem.mp4

@britzl
Copy link
Owner

britzl commented Mar 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants