How to use ModelViewerCamera?

Oct 20, 2011 at 8:55 AM
Hi!
How to use the ModelViewerCamera? I saw the samples that use
this kind of camera. It seems that a camera in Nine doesn’t need to
be put in a GameComponent. So, all I need to do is declare a camera
and fill in the blanks, right?
BTW, what are “Center” and [Max/Min]Radius Properties? Do they correspond
to the position and the near/far planes of the camera?
Thanks!
Yajie.
Coordinator
Oct 20, 2011 at 1:39 PM
The input logic of built in cameras is triggered by InputComponent, so you have to add that component before using these cameras. Just create a new ModelViewerCamera and the View/Projection property will be updated automatically.

ModelViewerCamera is orbiting around a sphere, "Center" is the center of that sphere.
Min/Max radius controls how far you can zoom the camera, it is not the near/far plane.
Oct 20, 2011 at 1:49 PM
Thanks Yufeih! That helps a lot!
From: [email removed]
Sent: Thursday, October 20, 2011 9:39 PM
To: [email removed]
Subject: Re: How to use ModelViewerCamera? [nine:276546]

From: yufeih

The input logic of built in cameras is triggered by InputComponent, so you have to add that component before using these cameras. Just create a new ModelViewerCamera and the View/Projection property will be updated automatically.

ModelViewerCamera is orbiting around a sphere, "Center" is the center of that sphere.
Min/Max radius controls how far you can zoom the camera, it is not the near/far plane.
Oct 22, 2011 at 8:38 AM
Can I indivisually set properties like Max/Min radius without having
to adjust other parameters?
BTW, why can’t I zoom in/out the camera when running samples
like ScreenEffects or DebuggerPrimitiveGame on the phone? These samples all
have a ModelViewerCamera in them. Should I set Max/Min radius
of the camera to enable zooming?
Thanks!
yajie.
From: [email removed]
Sent: Thursday, October 20, 2011 9:39 PM
To: [email removed]
Subject: Re: How to use ModelViewerCamera? [nine:276546]

From: yufeih

The input logic of built in cameras is triggered by InputComponent, so you have to add that component before using these cameras. Just create a new ModelViewerCamera and the View/Projection property will be updated automatically.

ModelViewerCamera is orbiting around a sphere, "Center" is the center of that sphere.
Min/Max radius controls how far you can zoom the camera, it is not the near/far plane.
Coordinator
Oct 23, 2011 at 2:29 AM
Zooming is not available on Windows Phone
Oct 23, 2011 at 8:06 AM
Well... can I take advantage of WP7’s gesture like “pinch”
to extend the camera’s features? Is there any way to do this
without modifying code of Nine?
From: [email removed]
Sent: Sunday, October 23, 2011 10:29 AM
To: [email removed]
Subject: Re: How to use ModelViewerCamera? [nine:276546]

From: yufeih

Zooming is not available on Windows Phone
Coordinator
Oct 23, 2011 at 10:48 AM
I suggest you grab the source code of ModelViewerCamera and add the pinch gesture to it.