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

LeanTween.rotateAroundLocal does strange things if a parent rectTransform has another rotation. #154

Open
Dover8 opened this issue Aug 17, 2020 · 0 comments

Comments

@Dover8
Copy link

Dover8 commented Aug 17, 2020

Scenario:
I have a world space based UI system (VR app). I was implementing a spinner on an alert view that the user could have placed anywhere in the world.

The spinner was using LeanTween.rotateAroundLocal and was fine for the initial position of the UI, but once the root canvas is moved, the rotation is still trying to rotate around the original axis, and is therefore no longer "local".

LTDescr rotate = LeanTween.rotateAroundLocal(rectTransform, Vector3.forward, amount, time).setEase(tween).setDelay(delay).setOnComplete(() =>
{
    OnPlayFinished.Invoke();
});

In the example, OnPlayFinished is invoking Play again to make a repeat effect.

fy7DrZu7gR

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

1 participant