Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Friebel

Issue in V3: play() respects timeScale on values higher than 0, but doesn't respect timeScale when set to 0

Recommended Posts

When timescale is set to 2 and we call play() directly after that, play() respects the value of timescale and plays twice the speed.

 

When timeScale() is set to 0 and we call play() directly after that, play() doesn't respect the value of timescale and resets timescale to 1 and plays.

To me this is not logical and inconsistant behaviour. I would expect the play() method to always respect the timeScale() value and never change it. So if we set a timeScale to zero, we do that on purpose. If we than call play() after that we do that on purpose also, because we would like to put the animation in play-mode, but for example like to tween the timeScale in to go gradually from 0 to 1.

 

See the Pen PoqRQeY by Friksel (@Friksel) on CodePen

Link to post
Share on other sites
46 minutes ago, ZachSaucier said:

This has been address in this thread:

 

@ZachSaucier Thanks for pointing to that thread. Also here, as written in another thread I just reacted, I think the same; I am a little dissapointed that the same logic doesn't apply everywhere and that the libs obviously thinks for itself and makes the decission for us developers in that something is 'wrong' and corrects it automatically. I don't really like that as we might not be wrong in doing something, but do it on purpose. As in this case. 

 

The use case I use this in I described above. And I think that's a pretty great reason to make a zero timescale work. So I am dissapointed about these decisions.

 

[edit] BTW, if there are people that on purpose wet a timeScale to 0 and than expect the playhead to move when setting play() and complain if it doesn't move then those are not great developers to begin with. On the other hand I do think that if you set a timescale to 0 you might expect the playhead to stay still when using play() and are allowed to complain if it changed the timescale by itself and moves the playhead, eventhough the developer set the timescale on purpose to zero.

 

That said, like I wrote in the other timeline, I will try if resume() is a solution for the issue I'm having in this project now.

Link to post
Share on other sites

Alright, just looked inside the project and unfortunately resume() isn't a solution here, as I need to play from a labels position with play('label'). So unfortunately the issue persists

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×