I am trying to move a gameObject by touch.
But no matter where I touch the object zooms to the right. I have asked someone with more experienced than me in unity and he has no idea why it isn't working. I also noticed that i had to set all the variable's values manually in the inspector.
Input.mousePosition returns ScreenCoordinates in pixels. Those are always > 0. So the x value of your velocity vector (the one you use to translate) will always be > 0 hence you move to the right.
What you have to do is convert the ScreenCoordinates to WorldCoordinates. You can do that using Camera.ScreenToWorldPoint.
answered Mar 09 '12 at 11:04 AM