Author Topic: Scale Animation issue  (Read 3299 times)

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Scale Animation issue
« on: October 17, 2017, 05:09:18 PM »
Dear All,

I have some trouble on adding as below animation. Please see the video of issue. I don't why the snap video is becoming smaller while switching faster. Please help me. Thanks. 


animation.add( PropertyAnimation( snap_t,         {property = "scale", start = 0, end = 1, time = 200}));   

https://youtu.be/0eOEYz2lm0w

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: Scale Animation issue
« Reply #1 on: October 18, 2017, 03:52:53 AM »
This worked for me:

Code: [Select]
//Background
local bg = fe.add_image("bg_base.png", 0, 0, flw, flh);

local bg_shrink_cfg = {
    when = When.StartLayout,
    when = Transition.ToNewList,
    property = "scale",
    start = 1.4,
    end = 1.0,
    time = 1000
    tween = Tween.Quad,
}

animation.add( PropertyAnimation( bg, bg_shrink_cfg ) );

Maybe cant be "0" , try "-0.001" to "1.0"

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: Scale Animation issue
« Reply #2 on: October 18, 2017, 07:28:04 PM »
This is not ok for grid theme. Anyway, I have forget it.

popoklo

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: Scale Animation issue
« Reply #3 on: October 20, 2017, 10:48:23 AM »
hey kent!

i also tried something with Timing Animation and had absolutely no Chance to fix the Situation you also seem to discovered:

in your Video:
Holding down a key for longer to go through games fast will fail animations or even conditions in tick callback. My variables should Change on tickcallback but do not if i hold a key to scroll through games and release it afterwards.
i didnt know a solution and tried VERY Long. no Chance.


liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: Scale Animation issue
« Reply #4 on: October 21, 2017, 10:45:07 PM »
Hey kent,

Yes, that is an  unfortunate bug. It looks like it's getting incorrect position information when the new animation starts before the previous finishes. The way I implemented scaling was kinda hacky - so it was bound to show some issues. It may be possible to update some of the animations values when a new one starts to correct it, but I'd have to dig deeper with the code.