x


conversion rate for a touch in local space and for an object in local space

Does anyone know the conversion rate for a finger touch in local space and an object in local space?

I am looking to see if there are conversion function from world space to object space. The problem I am having is that my finger touch is measured in screen space i.e. ((0,0) is the bottom left corner and (480, 320) is the upper right hand corner. In the game my X values spread from 0 to 1090, and the Y values go from 0 to 320. So basically speaking I am trying to get screen space and the World space to be 1:1 identical. I have tried camera.WorldToScreenPoint() without luck. It doesn't seem to want to update properly.

Any and all help will be appreciated.

more ▼

asked Mar 26 '10 at 02:30 AM

Ed gravatar image

Ed
22 8 8 14

Not sure what you mean... Care to elaborate?

Mar 27 '10 at 12:12 AM e.bonneville
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

There is no conversion rate. It depends how far away your object is from the camera, and how much depth of field your camera has. There is no direct correlation between pixels and world units, though the Camera class has various functions that let you convert from screen units to world units easily.

more ▼

answered Mar 29 '10 at 08:51 PM

qJake gravatar image

qJake
11.6k 43 78 161

Thanks for steering me in the right direction. I really appreciate it. This had been bugging me all weekend. :)

Mar 29 '10 at 09:09 PM Ed
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2014
x30
x25

asked: Mar 26 '10 at 02:30 AM

Seen: 1021 times

Last Updated: Mar 29 '10 at 08:38 PM