Move layout with drag and drop

0 favourites
  • 3 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • Hi

    I?m starting in this Construct universe and i have one question.

    I have an object which is drag and drop. I have constrained it to the edges. All is working fine except that when i drag it to the right, as there is more layout, the object goes out of wiew.

    Then i created an event

    system - every tick - system - Scroll to object

    Now its fine as i drag my object and the layout moves to follow it and show the background so i can navigate dragging the object.

    But the movement is so rude with jumps

    Is there a better way to make this trick? The game is something as that one where you try to take out a bone and if you touch the border the nose of the patient sounds and light. I need more precision dragging the object.

    Thank you very much for your time and interest.

  • every tick

    system set scrollx to lerp(scrollx,sprite.x,1-0.5^dt)

    system set scrolly to lerp(scrolly,sprite.y,1-0.5^dt)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much.

    It works perfect.

    I hope to be helpful too shortly.

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