Game Development Reference
In-Depth Information
Tip
The preceding default function uses the main camera to translate the coordinate from
screen space to world space. If you are taking input from an alternate view (like a mini-
map), be sure to use the specific camera for that view to convert the value, or else you will
get incorrect results.
Note
Remember that any coordinate you get back from the input system or used in world co-
ordinates are always Vector3 coordinates. However, because this is a 2D game, we need
coordinates in Vector2 coordinates, so you will need to convert the value you get back for
any 2D functions such as colliders or 2D distance checking.
Search WWH ::




Custom Search