shaderViewport movement isn't straight

  • #1, by ke4Saturday, 06. May 2017, 14:00 3 years ago
    Hi,

    I'm having this kind of issue. I zoomed through the shaderViewport into a scene. Now i want a slow camera zoom out effect. The problem is that the zoom out isn't straight movement - it goes to the right and back while zooming out which doesn't make any sense to me.

    Setting the zoom:
    shaderViewport(1.5, 315, 95, 0, 0, easeLinearInOut)
    1


    When i want the zoom out:
    shaderViewport(1, 0, 0, 0, 2500, easeLinearInOut)
    1

    Btw how do i matematically calc the offset that the camera needs in a 16:9 scene if i want to zoom exactly to the center? I don't want to guess it grin

    Key Killer

    810 Posts


  • #2, by SimonSSaturday, 06. May 2017, 14:04 3 years ago
    If you're using the newest version, there is a function
    function shaderViewportInterpolationPoint(x,y) 
    1
    2

    You can set it to 0.5,0.5, which will interpolate through the center position, default is 0,0 meaning the left top position.

    Thread Captain

    1368 Posts

  • #3, by ke4Saturday, 06. May 2017, 14:09 3 years ago
    Thanks Simon, works great!

    Key Killer

    810 Posts

  • #4, by genaticstudioSaturday, 18. January, 15:04 9 months ago
    How to use function?
    I use it but nothing happens.

    Newbie

    18 Posts

  • #5, by SimonSSaturday, 18. January, 16:07 9 months ago
    Check the log or press tab and check lua errors.

    Thread Captain

    1368 Posts

  • #6, by genaticstudioSaturday, 18. January, 18:07 9 months ago
    I copied from " Shader Toolkit". Why doesn't it work?
    Can you recommend a solution?

    Newbie

    18 Posts

  • #7, by afrlmeSaturday, 18. January, 18:11 9 months ago
    Where did you get the shader toolkit script from? The one on the wiki is out of date. The up to date one is here.

    Imperator

    6842 Posts

  • #8, by esmeraldaSaturday, 18. January, 21:25 9 months ago
    In the screenshot the execute script is: shaderZoom(1, 500, easing)
    Shoudn't the easing be specified? Like easeLinarIn, easeQintOut ...
    Could that be the problem?

    Great Poster

    389 Posts

  • #9, by genaticstudioMonday, 20. January, 05:21 8 months ago
    OK."Shader Toolkit"No problem.    Why doesn't it work?
    Am I using the wrong function? 
    i use fuction at begine of scene.

    Newbie

    18 Posts

  • #10, by afrlmeMonday, 20. January, 11:56 8 months ago
    Check your spellings mate. easeLinarIn > easeLinearIn.

    @Esmeralda: tsk tsk, I see it was you that told them the incorrect spellings. grin

    Easings can be found here: https://easings.net/en but In, Out, InOut goes on the end & not where it says on that page. For example: easeInSine would be easeSineIn in Visionaire.

    Imperator

    6842 Posts

  • #11, by genaticstudioMonday, 20. January, 14:35 8 months ago
    Thank you so much .
    I didn't notice and interpret.
    OK, it works.

    Newbie

    18 Posts

Write post