- Home /
Question by
spacelyjoe · Sep 29, 2014 at 07:18 PM ·
positiontouchtouches
Rects not lining up with touch input.
So I have 4 rects
when I use the rects[i].contains(myTouches[i].position) clicking on the top left one registers for the bottom left and the top right one registers for the bottom right and visa versa
I tried doing a thing like this
float touch_x = myTouches[i].position.x;
float touch_y = myTouches[i].position.y;
touch_y = Screen.height - touch_y;
if(recs[i].Contains(new Vector2(touch_x, touch_y))){
}
that was suppose to switch the input over the y axis but it didn't work.
Any way to get around this?
Comment
Best Answer
Answer by spacelyjoe · Sep 29, 2014 at 07:32 PM
Basically I need a script to reverse the y of the touch input vector 2
Your answer
Follow this Question
Related Questions
Why can't I press both my touch controls at the same time? 1 Answer
Lerp not working 1 Answer
How to make object follow touch position?Pls Help 0 Answers
Input.touches vs Input.GetTouch 1 Answer