S
Squigglestixx
Guest
I'm programing a point and click adventure game where you can drag items from your inventory on to other objects in order to use them. I want the item object to snap back into it's place in your inventory if it can't be used, moving VERY quickly at first, and then much slower for the last bit of distance till it's back in it's place on your inventory bar. I've got the clicking and dragging parts down pretty well, but nothing I seem to change has any real effect on slowing down the object.
does anyone have any suggestions (with sample code hopefully) that can make this work? i've tried nested if statements that check the distance and lower the speed accordingly, but it seems to not have enough time to slow the object and you don't "see" the slowing effect (or it's just not working at all, i can't tell). i've also tried increasing the friction if the object is close to a point. this also seems to do literally nothing.
does anyone have any suggestions (with sample code hopefully) that can make this work? i've tried nested if statements that check the distance and lower the speed accordingly, but it seems to not have enough time to slow the object and you don't "see" the slowing effect (or it's just not working at all, i can't tell). i've also tried increasing the friction if the object is close to a point. this also seems to do literally nothing.