- Home /
move a GameObject based on Input.GetTouch
My game has a Orthographic camera, and i want to move a gameobject based on the touch input on a iOS device. What is the best way to translate the touch position to the gameobjects X & Y position. So the gameobject stays exactly on the toch position?
Answer by Mattivc · Sep 11, 2010 at 10:35 AM
I managed to solve the problem by feeding the touch position into Camera.ScreenPointToRay. And then applying the result to the gameobject.
Thank you for stating how you solved your problem. Too few times do I see questions get resolved and no follow-up done to let others know how it was solved. :)
Your answer
Follow this Question
Related Questions
Continuous detection of object using ray cast 2 Answers
mouse input to touch input help please 0 Answers
Gradually decrease camera pan speed when touch has ended? (Touch input) 0 Answers
Drag+an+object+to+touch+position(Problem) 0 Answers
Code Not Working 1 Answer