Search the Community
Showing results for tags 'globalTimeScale'.
Hello, I'm using TweenMax in a game I'm making for scripted events. While stress testing, I noticed TweenMax tweens get ahead when the game dips below the intended 30 fps. I tried setting the tweens to use frames, thinking it would tick at the game's current fps, but it still appears to update at a fixed framerate. The only difference being the number i enter for the delay or duration. Another thing I tried was setting TweenMax.globalTimeScale to the current fps divided by 30 every frame, but tweens never seem to initialize when using this method. In short, my game doesn't use a fixed framerate and was wondering if TweenMax is able to do the same. Thanks for your time!
I was curious if there is a way to "overwrite" the globalTimeScale with the one assigned to a given TweenMax instance. For example: - I set the entire playback to slow-motion by setting globalTimeScale( 0.25 ); - Then, whenever I shoot enemies, I want to delay the SFX call with TweenMax.delayedCall in realtime timeScale, so I use: TweenMax.delayedCall( pTime, playSFX, [pSoundClass, pLoop]).timeScale(1); But this still animates according to the globalTimeScale (I'm assuming it does timeScale x globalTimeScale = 1 x 0.25 = 0.25). This DOES seem like the correct typical behavior (one timeline governing them all), but is there a way to overwrite this behavior? The only way I could get around it was by dividing 1 / TweenMax.globalTimeScale(), which gives the "inverted" time-scale value for the delay to catch-up to realtime durations. Is there any other approach to overwrite the timeScale of a given TweenMax instance? A boolean or a binary flag?