# vector2 is 0 to 1?

 0 I saw the document say vector2's x axis is between 0 and 1.I have a question!Input.GetTouch(i).position is a vector2?right?But I saw Input.GetTouch(i).position.x is between 0 and 480(My mobile screen's size)!Why?And how can I normalize it to vector2's standard 0-1? more ▼ asked Sep 02 '11 at 01:29 AM noob22 48 ● 43 ● 48 ● 49 add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

 0 Vector2 x and y components are arbitrary floating-point numbers. A particular function will return values as documented for that specific function. To normalise a Touch position, divide x by Screen.width and y by Screen.height. more ▼ answered Sep 02 '11 at 01:34 AM Waz 6.5k ● 23 ● 33 ● 71 I want to do http://this.It should come out a object where I touched the screen!But the object's position is 0 to 1.Input.GetTouch.position is 0 to my mobile's width. How to do this? Sep 02 '11 at 01:47 AM noob22 Sorry, but you're really hard to understand. Sep 02 '11 at 06:43 AM Waz add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users
 0 No, Vector2 is two floats, so x and y have the range of a single-precision float. more ▼ answered Sep 02 '11 at 01:34 AM Eric5h5 81.5k ● 42 ● 133 ● 529 I want to change x and y have the range of 0 to 1?How to do it? Sep 02 '11 at 01:37 AM noob22 Maybe you can make vector2 x or y to bigger than 1,but you cannt see your object in camera? Sep 02 '11 at 01:40 AM noob22 add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

By Email:

Topics:

x915
x606
x501
x47
x18

asked: Sep 02 '11 at 01:29 AM

Seen: 1035 times

Last Updated: Sep 02 '11 at 06:43 AM