Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / TweenCustom bug?

Author
Message
Bogle
1
Years of Service
User Offline
Joined: 30th Apr 2022
Location:
Posted: 8th Oct 2023 04:56
So, I have a solution to this. But it took a while for me to figure out what was wrong so I thought I'd post anyway.

TweenCustom's initial values are always zero, no matter what value is supplied. The desired initial value seems to be its second value. I've tested and this isn't the case for TweenSprite. The simple solution is to call UpdateTweenCustom twice when first starting it (once in the main loop, plus once after calling PlayTweenCustom), but it isn't desirable. Alternative solution is to just not use TweenCustom and make blank non-visible sprites to handle all positional non-sprite related tweens (like for particles) via TweenSprite. This probably isn't intended behavior, right? Here's an example:



As you'll see, the sprites will relocate to the location 0, 0 for one frame when the tweens are restarted.

Login to post a reply

Server time is: 2023-12-04 21:02:38
Your offset time is: 2023-12-04 21:02:38