-
Notifications
You must be signed in to change notification settings - Fork 124
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
Wrong coordinates when using a container #26
Comments
i never hit this bug. but i know to get the origin coordinates of an event may be chalenging. I dont have much time unfortunatly. but here is part of the solution. here is a function which contains the solution for another module you could port that into virtualjoystick.js and do a pull request. or you would have to wait until i got time to fix. thanks a bunch for reporting the issue btw! :)
|
Hi, |
That would be great, thanks! Can you add it as a pull request? |
I'm having the same issue. When it's in a container at the bottom of the screen, it will only give a negative y value |
I used custom variable in option, to force offset coordinate, looks like it works.
|
When I set the container property of the VirtualJoystick object it does not appear where I point but it has an X and Y offset. X is the number of pixels the container's left side is away from the left side of the page and Y is the number of pixels the container's top is away from the top of the page, so somewhere I guess you miss correcting the coordinates with the container's coordinates.
The text was updated successfully, but these errors were encountered: