Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Is there a way to cancel a drag action, and force the item to move back to its start position, but animated, with dt?
Currently I do this manually, and it is quite a mission.
JACLEMGO I did something along these lines by saving item x/y values on drag start and setting the item location back to those when certain things happen (like collisions or what ever you wish to be the cancel action). Adding animation to that shouldn't be too hard, dont take my word for it though :)
Yeah, just use a variable for the return, and the start positions like:
object variable return =1
object set position to lerp(self.x,startx, 1-0.5^dt), lerp(self.y, starty,1-0.5^dt)
Develop games in your browser. Powerful, performant & highly capable.
newt Tks, that is exactly what I was looking for!