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

Animation for closing doors transition #7

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

kpmaalej
Copy link

Hi,

Your animation for closing doors transition was wrong (I guess that's why it was not in the demo). Here is a correct one.

Cheers,

sah = -sin(animationTime * 0.5);
innerTexture = beginTexture;
outerTexture = endTexture;
depth = -1.0 + 0.5 * ( (animationTime < - M_PI_2) ? 0.0 : 1/(animationTime-0.25)-1/(-M_PI_2-0.25) );
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lot of trial-and-error to adjust for a proper animation of the inner view. Found that a hyperbolic function, delayed until the doors were at -π/2 (and therefore beginning to show), was the right choice.

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

Successfully merging this pull request may close these issues.

3 participants