how to combine "canvas to layer" + "Lerp"?

0 favourites
  • 4 posts
From the Asset Store
Pixel Destruction like in "Worms" (Drawing Canvas based)
  • I'm using this formula to make an effect where an object transits between 2 layers. I want to soften this effect, I thought about using the expression "Lerp", but I don't know how to apply it

  • I don't understand why you need lerp here. The object will stay in the same position on the screen, but on a different layer. Maybe you forgot to add "Move to layer" action?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • My layout has the same dimension as the windows size, and only 2 layers. The top layer has a normal scale (1.0) while the other has a reduced scale (0.7). When I use the canvas to layer option, moving a sprite from one layer to another, it simply shrinks, I wanted it to transit by shrinking slowly. So I imagined using the expression lerp in the coordinates of the formula, but I don't know how to apply it.

  • Transition to another layer is instant, you can't use lerp for it. What you need to do is change the sprite size before moving to another layer.

    For example: run a Tween that will change sprite scale from 1 to 0.7 over 0.5 seconds, but keep the sprite on its original layer. At the end of the tween move the sprite to another layer using those long expressions to match its position, and restore the sprite scale to 1.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)