Interpolate Error?

jamie_cjamie_c ImagineLabs.rocksMember, PRO Posts: 5,772
edited December 2020 in Working with GS (Mac)

@adent42 I think there might be an error somewhere in the Interpolate Behavior. In the project I have attached the screen is overlaid with an actor, after 2 seconds this actor reduces in size and its position should stay locked at the bottom of the screen. But you'll see once the actor begins to resize it jumps up a few pixels and then reduces in size as expected.

The Interpolate Behavior is set to transition over 1 second. If you reduce this time, the amount of pixels the actor jumps is increased and if you increase this time the pixels the actor jumps is decreased. I'm thinking there might be an error in its calculations somewhere?


Comments

  • UltraLionBluUltraLionBlu Member Posts: 157

    Hi Jamie, it's a weird effect, does it look like a bug? But if you need to correct it add a second interpolation

    interpolate self position Y to 0 for 1 (or in any case the time you will insert in the first interpolation)

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited December 2020

    @UltraLionBlu Hi thanks for the tip. It is definitely fixable with additions to the behaviors but it seems like it shouldn't be doing what it does. I can fix it for my needs just wanted to point out a potential bug in case it can be fixed.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,223
    edited December 2020

    If I use some display text, I can see it's not an interpolate bug, it's a timing bug.

    The height is always slightly smaller than the position. It looks like something like this:

    loop 1:

    height gets smaller

    draw

    loop 1:

    size gets smaller based on loop 1

    height gets smaller

    draw


    That difference between whenever the interpolate executes and then the constrain executes is the cause of the problem.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,223
    edited December 2020

    If you use two interpolates (one for height and one for position), then you get the desired effect.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @adent42, @UltraLionBlu , I'll give it a try. Thanks to you both! :)

Sign In or Register to comment.