How do I smooth transition to it's place in drag n drop

  • Hello,

    I am working on a drag and drop game and need a smooth transition to get sprite back to it's actual place if user drag the sprite to wrong choice.

  • Just remember the starting cords of the object and on object release check if new position is wrong or right. If it is wrong then use lerp function or simply Move at angle. Depends what do you mean by "smooth"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi BackendFreak,

    Can you write lerp function for me. My sprite actual position is 577, 480 and need to drag it back to it's actual position from 833, 192. I am creating a drag and drop game and when user drag the sprite to wrong choice then sprite get back to its actual position with a smooth transition effect.

  • Just remember the starting cords of the object and on object release check if new position is wrong or right. If it is wrong then use lerp function or simply Move at angle. Depends what do you mean by "smooth"

    Hi BackendFreak,

    Can you write lerp function for me. My sprite actual position is 577, 480 and need to drag it back to it's actual position from 833, 192. I am creating a drag and drop game and when user drag the sprite to wrong choice then sprite get back to its actual position with a smooth transition effect.

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