|
is unity's input.mousePosition equivalent to first finger touch in mobile and touchscreens?
(comments are locked)
|
|
If you are talking about Touch inputs, check the following links. http://unity3d.com/support/documentation/ScriptReference/Touch.html http://unity3d.com/support/documentation/ScriptReference/Input.html To pull the info of 1st touch, use the fingerID to check if it's the first touch. To get the positions, use the touch position. Try using Input.GetTouch(0).position. Good luck! Input.mousePosition appears to be equivalent to the first touch point. Try it!
Oct 30 '11 at 05:49 AM
ina
Oh whoops! Sorry. Thought u were asking from Mouse input -> Touch not the other way. Anyways, Yes Input.mousePosition is same as touch.position. button click downs are... Input.GetMouseButton(0) http://unity3d.com/support/documentation/ScriptReference/Input.GetMouseButton.html Input.mousePosition is the position of the mouse (Vec2)(x,y) http://unity3d.com/support/documentation/ScriptReference/Input-mousePosition.html Sorry about the confusion.
Oct 30 '11 at 06:04 AM
GoSuNeem
it looks like Input.mousePosition actually returns a Vector3 with z coordinate 0, while Input.touch.position returns just a Vec2...
Oct 30 '11 at 10:48 PM
ina
(comments are locked)
|
