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

0 favourites
  • 4 posts
From the Asset Store
It's here!
$4.95 USD
Creepy and nasty horror track. It's terrifying from the beginning till the end. Goosebumps guaranteed
  • 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"

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)