android - UNITY touch position to world position 2D -
how can transform touch position (on phones) world position. instance if phone's screen size 1440 2560 , touch position on phone x 600 y 700. how can transform position world position on unity?
i need can know user set finger.
there method you. have @ camera.screentoworldpoint.
once have reference desired photographic camera can utilize this:
vector2 touchpos = input.touches[0].position; vector3 touchposinworldspace = camera.screentoworldpoint(new vector3(touchpos.x, touchpos.y, camera.nearclipplane));
android unity3d touch 2d screen
No comments:
Post a Comment