- Home /
Question by
Tofudude624 · Jul 24, 2011 at 08:16 AM ·
iostouch
Touching a collider?
Hello. What would be the best way to determine when the user's touch.position comes into contact with a collider? I know that is is using a raycast, but how do I draw a ray from the touch.position? Thanks
Comment
Best Answer
Answer by Mortennobel · Jul 24, 2011 at 09:10 AM
Use the ScreenPointToRay
It should be easy to rewrite the following script to use Touch input instead of mouse input.
http://unity3d.com/support/documentation/ScriptReference/Input-mousePosition.html
Your answer
Follow this Question
Related Questions
Unity 2D Mobile Game Drawing Mechanic 0 Answers
Is touch began guaranteed? 0 Answers
How to play sound on GUI touch IOS 1 Answer
iOS Mobile - Mouse Input vs Touch Input 1 Answer
Multiple Touch Drag iOS 0 Answers