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

Method to stop transitions? #530

Open
diemildefreude opened this issue Jul 23, 2024 · 1 comment
Open

Method to stop transitions? #530

diemildefreude opened this issue Jul 23, 2024 · 1 comment

Comments

@diemildefreude
Copy link

diemildefreude commented Jul 23, 2024

Is your feature request related to a problem? Please describe.

I have an automatic movement setup for when the user is idle. If the user inputs movement (drag, scroll/pinch), I can cancel any subsequent movements, but any current rotate() or dolly/dollyTo() method-call continues until it's done. I'd like the auto-transition to immediately stop, ceding complete control to the user.

Describe the solution you'd like

There was a similar feature request here before for a cameraControls.cancelAllTransitions() method, but the user rescinded it. In their case, they mistakenly thought that multiple transitions were fighting with each other, but it was an error on their end. However, my request is related to the auto-transition fighting with live user inpt.

So yes, something like cancelAllTransitions() would be nice...

Describe alternatives you've considered

I've been trying workarounds like calling a new dollyInFixed(0, false) followed by cameraControls.update(0), but no success yet. If I set smoothTIme = 0, it jumps to the destination of the previous dollyInFixed call.

Additional context

The problem is easy to see in the infinite dolly example if you change the dollyInFixed values to 10/-10 and set cameraControls.smoothTime = 10.

@yomotsu
Copy link
Owner

yomotsu commented Aug 17, 2024

Sorry for the delay.
I just added a new method called stop().

cameraControls.stop();

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