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

getLocalPosition working incorrectly on rotated container #1896

Closed
dvyskoc opened this issue Jun 13, 2015 · 3 comments
Closed

getLocalPosition working incorrectly on rotated container #1896

dvyskoc opened this issue Jun 13, 2015 · 3 comments
Labels
🕷 Bug Verified that it’s actually a legit bug that exists in the current release.

Comments

@dvyskoc
Copy link

dvyskoc commented Jun 13, 2015

Hello, first of all I want to thank for your hard work on this great library.

There is my problem. I used getLocalPosition on container. Everything was okay until I changed rotation of container. Then it started to return strange values. Please check my little demo

Purple dot (child of rotating container) should follow local position of mouse. If container is rotating it is not working. However when container stops at 0 degrees dot will move to position of mouse.

I compared code of versions 3.0.6 and 2.2.9

there is little difference

3.0.6
point.x = a11 * id * global.x + -a01 * id * global.x + (a12 * a01 - a02 * a11) * id;
point.y = a00 * id * global.y + -a10 * id * global.y + (-a12 * a00 + a02 * a10) * id;

2.2.9
point.x = a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id;
point.y = a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id;

That change was suggested here, however it looks like it is causing problems (I don't know if it is fixing other issues).

When I replaced x and y properties (as it is in version 2.2.9) it stared to behave normally.

Could you please check it?

@DanielBertocci
Copy link

I've noticed the same problem: thank you!

@englercj englercj added 🕷 Bug Verified that it’s actually a legit bug that exists in the current release. Interaction Manager labels Jul 7, 2015
@GoodBoyDigital
Copy link
Member

This should be fixed now 👍

@lock
Copy link

lock bot commented Feb 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🕷 Bug Verified that it’s actually a legit bug that exists in the current release.
Projects
None yet
Development

No branches or pull requests

4 participants