- Home /
button that moves an object
I want to be able to hold down a button and it moves an object from one location and when i release it moves back to its original position. and i would like it to move smoothly, is this possible if so does anyone know how to do it or perhaps have a script that i could look at.
thanks for reading this zalanthos
Do u want to move your object from point A to point B, or in some direction?
Yeah I want it to go to point a to point b but I would like it to move smoothly if you know what I mean so like I press a button and it moves slow enough to watch it move or even have a variable to ajust it. If you know what I mean
Answer by haim96 · Mar 06, 2014 at 09:59 AM
watch this video and code sample:
http://unity3d.com/learn/tutorials/modules/beginner/scripting/lerp