x


Iphone 2d camera settings

Hi, Im working on a 2D game for iphone and i would like to know how to set the Camera for orhographic mode. This is the fields i'd like to know how to set: 1.Near Clip Plane 2.Field Of View 3.Orthographic Size

Please Note: I need this settings per orientation, one for portrait and other for landscape.

Thanks.

more ▼

asked Jul 13 '10 at 08:05 PM

Easy gravatar image

Easy
37 8 8 13

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

The near clip plane isn't any different from what it would be in non-orthographic mode. Field of view is irrelevant for orthographic mode. Orthographic size depends on what you want to do.

more ▼

answered Jul 13 '10 at 08:25 PM

Eric5h5 gravatar image

Eric5h5
80.1k 41 132 519

Can you please be more specific on what it depend? Orthographic size is the most field im interting in. Thanks.

Jul 13 '10 at 08:52 PM Easy

@Easy: The size is half the number of units that fill the vertical screen size. i.e., using .5 means that a 1-unit cube would exactly fill the screen from top to bottom.

Jul 13 '10 at 09:09 PM Eric5h5

so basicly if i'm working with this resolution 320x480 for portrait then i need to set the orthographic size to 240 and if im working with 480x320 for landscape i need to set it to 160?

Jul 13 '10 at 09:34 PM Easy

@Easy: If you wanted one unit to equal one pixel, yes, though that would only work on pre-iPhone 4 screens.

Jul 14 '10 at 12:15 AM Eric5h5

is there a better way to be more generic for both devices?

Jul 14 '10 at 09:34 AM Easy
(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:

x2988
x1999
x1034
x89

asked: Jul 13 '10 at 08:05 PM

Seen: 2654 times

Last Updated: Jul 13 '10 at 08:05 PM