Are ease Animations configurable?

  • #1, by stothewSunday, 03. June 2018, 14:00 6 years ago
    Hi there!

    i use "startObjectTween" for a bounce effect of my interface. But since i do a pixel game the bounce of "easeBounceOut" is too strong. Is there any way to config those effects?

    Thanks!
    function openInventory_alter(time)
    startObjectTween(Interfaces["inventory_on_alter"], VInterfaceOffset, Interfaces["inventory_on_alter"].InterfaceOffset, {x = 0, y =0}, time, easeBounceOut)
    end

    Forum Fan

    127 Posts


  • #2, by afrlmeSunday, 03. June 2018, 14:10 6 years ago
    Not currently to my knowledge. The slower something moves the less bounce there will be though. Also you should be using the to() function instead of startObjectTween(), it's much more efficient.

    Interfaces["name"]:to(1000, { Offset = {x = 0, y = 0} }, easeBounceOut)

    What you could do maybe is have it move in fast with linear easing until the last x pixels or so then add a pause for the duration then set another to() function to move the last bit of distance with the easeBounceOut easing at a slower rate. It might work because the less distance/speed the less bounce there should be.

    Imperator

    7278 Posts

  • #3, by stothewSunday, 03. June 2018, 15:22 6 years ago
    After playing with some numbers i´m more happy than before but its still is not that smooth because "BounceOut" starts with a slower part.

    Guess may another ease comes more handy.

    But Thank you for your help.


    Forum Fan

    127 Posts

  • #4, by afrlmeSunday, 03. June 2018, 20:17 6 years ago
    Try easeQuintOut or easeCircOut for the initial tween. Also maybe set the pause so it's 50ms less than the initial tween duration so that you overwrite the tween before it comes to a full stop. I believe bounceOut starts with the regular linear easing, but the delay you add for the transition is what will be causing it to move slower.ok, try this...

    Set the first tween so that it covers 50% of the distance with half the delay you set for 100% then have the bounce out start immediately after with the same delay value. The amount of bounce should still be less than before. I'm sure if you mess around a bit that you will get it right.

    Imperator

    7278 Posts