Input.mousePosition equivalent to first finger touch?

is unity’s input.mousePosition equivalent to first finger touch in mobile and touchscreens?

On a touch device:

The above answers are correct only if you are touching with one finger at a time. When there is more than one touch active at the same time, Input.mousePosition is actually the average of all touch positions in the Input.touches array.

Another difference is that where there are no touches, you might expect Input.mousePosition to return zero, but it doesn’t. It remains at the position the last touch or touches were released (as if you “let go” of the mouse).

All of this said, you should be using platform-specific code that references either Input.mousePosition or the Input.touches array for your logic (use the Platform Dependent Compilation defines or the Application.platform variable).

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!

If using the mouse input is “equivalent” to using the first finger touch input…
When considering a touch: yes; when considering the actual mouse: no.

The first touch simulates the mouse input, so if you use Input.mousePosition, it will work both with the actual mouse and the first touch.
But the opposite does not happen, i.e. if you are just handling the touches, the mouse won’t simulate that, so your code will only work on touch devices.

EDIT: To answer the comments, you can use Input.simulateMouseWithTouches = false; if you want to disable the mouse simulation with the touches (it is enabled by default).