camera.orbit issue.

View: New views
14 Messages — Rating Filter:   Alert me  

camera.orbit issue.

by Hanpan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've just download the latest version of PV2.0 and there seems to be a lot of changes to cameras.

What I am trying to do is create a really simple camera orbit, exactly like this:
http://www.whitevoid.com/application.html

I have tried using camera.orbit and a variety of different mouseXY algorithyms but I can't seem to get anything that resembles that simple "wobble" effect. My planes, viewports are all setup basically so I know its something I am doing with the camera.

Any help appreciates!

Re: camera.orbit issue.

by Helmut Granda-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Look at the sample files.... there are some similar exercises in there.


On Thu, Jul 17, 2008 at 1:56 PM, Sceneshift <jon@...> wrote:

Hi,

I've just download the latest version of PV2.0 and there seems to be a lot
of changes to cameras.

What I am trying to do is create a really simple camera orbit, exactly like
this:
http://www.whitevoid.com/application.html

I have tried using camera.orbit and a variety of different mouseXY
algorithyms but I can't seem to get anything that resembles that simple
"wobble" effect. My planes, viewports are all setup basically so I know its
something I am doing with the camera.

Any help appreciates!
--
View this message in context: http://www.nabble.com/camera.orbit-issue.-tp18513695p18513695.html
Sent from the Papervision3D mailing list archive at Nabble.com.


_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org



--
...helmut

_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

Re: camera.orbit issue.

by Hanpan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Please excuse my ignorance... I looked through the GW example files but couldn't find anything like this... is there someplace in particular I should be looking?

Helmut Granda-2 wrote:
Look at the sample files.... there are some similar exercises in there.


On Thu, Jul 17, 2008 at 1:56 PM, Sceneshift <jon@sceneshift.com> wrote:

>
> Hi,
>
> I've just download the latest version of PV2.0 and there seems to be a lot
> of changes to cameras.
>
> What I am trying to do is create a really simple camera orbit, exactly like
> this:
> http://www.whitevoid.com/application.html
>
> I have tried using camera.orbit and a variety of different mouseXY
> algorithyms but I can't seem to get anything that resembles that simple
> "wobble" effect. My planes, viewports are all setup basically so I know its
> something I am doing with the camera.
>
> Any help appreciates!
> --
> View this message in context:
> http://www.nabble.com/camera.orbit-issue.-tp18513695p18513695.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D@osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>



--
...helmut

_______________________________________________
Papervision3D mailing list
Papervision3D@osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

Re: camera.orbit issue.

by venanmusic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello.
Actually i think the whitevoid should have a better camera movemente.
so, i did it.
here the planes "look" at he mouse, instead of turning their backs into mouse. lol
sorry my english sucks.

In the render function you should have something like this

addEventListener(Event.ENTER_FRAME, loop);
function loop(e:Event):void {

        var rotY: Number = (mouseY-(stage.stageHeight/2))/(stage.height/2)*(300);
        var rotX: Number = (mouseX-(stage.stageWidth/2))/(stage.width/2)*(-300);
        camera.x= camera.x+(rotX-camera.x)/5;
        camera.y= camera.y+(rotY-camera.y)/5;
       
        renderer.renderScene(scene, camera, viewport);
}

what are u doing? the 1st part of the script(2 lines) you are setting how much distance your planes would have, and where they should turn. try changing the 300 to some other value.
and finally the last 2 lines of code are move the camera, and setting a delay time or a tweener effect. change the value 5 for different speeds.

I think thats all.
u can see a experiment here with this script running:
www.andrevenancio.com/teste2/





Sceneshift wrote:
Hi,

I've just download the latest version of PV2.0 and there seems to be a lot of changes to cameras.

What I am trying to do is create a really simple camera orbit, exactly like this:
http://www.whitevoid.com/application.html

I have tried using camera.orbit and a variety of different mouseXY algorithyms but I can't seem to get anything that resembles that simple "wobble" effect. My planes, viewports are all setup basically so I know its something I am doing with the camera.

Any help appreciates!

Re: camera.orbit issue.

by Hanpan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thanks very much for the reply.

For some reason, my example just pans the camera around and my planes don't rotate. Do I need to set the camera to lookAt a particular target? What are you camera settings?

Also, is this example using the Great White trunk or 1.5?

Thanks!


hello.
Actually i think the whitevoid should have a better camera movemente.
so, i did it.
here the planes "look" at he mouse, instead of turning their backs into mouse. lol
sorry my english sucks.

In the render function you should have something like this

addEventListener(Event.ENTER_FRAME, loop);
function loop(e:Event):void {

        var rotY: Number = (mouseY-(stage.stageHeight/2))/(stage.height/2)*(300);
        var rotX: Number = (mouseX-(stage.stageWidth/2))/(stage.width/2)*(-300);
        camera.x= camera.x+(rotX-camera.x)/5;
        camera.y= camera.y+(rotY-camera.y)/5;
       
        renderer.renderScene(scene, camera, viewport);
}

what are u doing? the 1st part of the script(2 lines) you are setting how much distance your planes would have, and where they should turn. try changing the 300 to some other value.
and finally the last 2 lines of code are move the camera, and setting a delay time or a tweener effect. change the value 5 for different speeds.

I think thats all.
u can see a experiment here with this script running:
www.andrevenancio.com/teste2/





Sceneshift wrote:
Hi,

I've just download the latest version of PV2.0 and there seems to be a lot of changes to cameras.

What I am trying to do is create a really simple camera orbit, exactly like this:
http://www.whitevoid.com/application.html

I have tried using camera.orbit and a variety of different mouseXY algorithyms but I can't seem to get anything that resembles that simple "wobble" effect. My planes, viewports are all setup basically so I know its something I am doing with the camera.

Any help appreciates!


Re: camera.orbit issue.

by venanmusic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
This is pv3d GW

goto my website, i´ve got the code there 4 you.
www.andrevenancio.com/teste2/code.zip



Hi,

Thanks very much for the reply.

For some reason, my example just pans the camera around and my planes don't rotate. Do I need to set the camera to lookAt a particular target? What are you camera settings?

Also, is this example using the Great White trunk or 1.5?

Thanks!

venanmusic wrote:
hello.
Actually i think the whitevoid should have a better camera movemente.
so, i did it.
here the planes "look" at he mouse, instead of turning their backs into mouse. lol
sorry my english sucks.

In the render function you should have something like this

addEventListener(Event.ENTER_FRAME, loop);
function loop(e:Event):void {

        var rotY: Number = (mouseY-(stage.stageHeight/2))/(stage.height/2)*(300);
        var rotX: Number = (mouseX-(stage.stageWidth/2))/(stage.width/2)*(-300);
        camera.x= camera.x+(rotX-camera.x)/5;
        camera.y= camera.y+(rotY-camera.y)/5;
       
        renderer.renderScene(scene, camera, viewport);
}

what are u doing? the 1st part of the script(2 lines) you are setting how much distance your planes would have, and where they should turn. try changing the 300 to some other value.
and finally the last 2 lines of code are move the camera, and setting a delay time or a tweener effect. change the value 5 for different speeds.

I think thats all.
u can see a experiment here with this script running:
www.andrevenancio.com/teste2/





Sceneshift wrote:
Hi,

I've just download the latest version of PV2.0 and there seems to be a lot of changes to cameras.

What I am trying to do is create a really simple camera orbit, exactly like this:
http://www.whitevoid.com/application.html

I have tried using camera.orbit and a variety of different mouseXY algorithyms but I can't seem to get anything that resembles that simple "wobble" effect. My planes, viewports are all setup basically so I know its something I am doing with the camera.

Any help appreciates!

Re: camera.orbit issue.

by Hanpan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thanks for the code sample, it was very enlightening. It appears that the camera3D class has been updated with the latest build of GW making this method act kind of strangely. At least I know it's nothing I am doing wrong though!


Hi
This is pv3d GW

goto my website, i´ve got the code there 4 you.
www.andrevenancio.com/teste2/code.zip

Re: camera.orbit issue.

by Hanpan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, with a LOT of playing about I finally managed to solve this (kinda).

var rotX:Number = (_stage.stage.mouseX-(_stage.stage.stageWidth / 2))*(0.05)-90;
var rotY:Number = (_stage.stage.mouseY-(_stage.stage.stageHeight / 2))*(0.05)+90;
camera.orbit(rotY, rotX);

The important thing to note is that you need to add +/-90 (degrees) onto the rotation figures in order to get the camera to face the stage directly.


Hi,

Thanks very much for the reply.

For some reason, my example just pans the camera around and my planes don't rotate. Do I need to set the camera to lookAt a particular target? What are you camera settings?

Also, is this example using the Great White trunk or 1.5?

Thanks!

venanmusic wrote:
hello.
Actually i think the whitevoid should have a better camera movemente.
so, i did it.
here the planes "look" at he mouse, instead of turning their backs into mouse. lol
sorry my english sucks.

In the render function you should have something like this

addEventListener(Event.ENTER_FRAME, loop);
function loop(e:Event):void {

        var rotY: Number = (mouseY-(stage.stageHeight/2))/(stage.height/2)*(300);
        var rotX: Number = (mouseX-(stage.stageWidth/2))/(stage.width/2)*(-300);
        camera.x= camera.x+(rotX-camera.x)/5;
        camera.y= camera.y+(rotY-camera.y)/5;
       
        renderer.renderScene(scene, camera, viewport);
}

what are u doing? the 1st part of the script(2 lines) you are setting how much distance your planes would have, and where they should turn. try changing the 300 to some other value.
and finally the last 2 lines of code are move the camera, and setting a delay time or a tweener effect. change the value 5 for different speeds.

I think thats all.
u can see a experiment here with this script running:
www.andrevenancio.com/teste2/





Sceneshift wrote:
Hi,

I've just download the latest version of PV2.0 and there seems to be a lot of changes to cameras.

What I am trying to do is create a really simple camera orbit, exactly like this:
http://www.whitevoid.com/application.html

I have tried using camera.orbit and a variety of different mouseXY algorithyms but I can't seem to get anything that resembles that simple "wobble" effect. My planes, viewports are all setup basically so I know its something I am doing with the camera.

Any help appreciates!

Re: camera.orbit issue.

by gordee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi
 
what does _stage represent?

Gordon Everett




> Date: Fri, 18 Jul 2008 05:12:01 -0700

> From: jon@...
> To: papervision3D@...
> Subject: Re: [Papervision3D] camera.orbit issue.
>
>
> Ok, with a LOT of playing about I finally managed to solve this (kinda).
>
> var rotX:Number = (_stage.stage.mouseX-(_stage.stage.stageWidth /
> 2))*(0.05)-90;
> var rotY:Number = (_stage.stage.mouseY-(_stage.stage.stageHeight /
> 2))*(0.05)+90;
> camera.orbit(rotY, rotX);
>
> The important thing to note is that you need to add +/-90 (degrees) onto the
> rotation figures in order to get the camera to face the stage directly.
>
>
> Sceneshift wrote:
> >
> > Hi,
> >
> > Thanks very much for the reply.
> >
> > For some reason, my example just pans the camera around and my planes
> > don't rotate. Do I need to set the camera to lookAt a particular target?
> > What are you camera settings?
> >
> > Also, is this example using the Great White trunk or 1.5?
> >
> > Thanks!
> >
> >
> > venanmusic wrote:
> >>
> >> hello.
> >> Actually i think the whitevoid should have a better camera movemente.
> >> so, i did it.
> >> here the planes "look" at he mouse, instead of turning their backs into
> >> mouse. lol
> >> sorry my english sucks.
> >>
> >> In the render function you should have something like this
> >>
> >> addEventListener(Event.ENTER_FRAME, loop);
> >> function loop(e:Event):void {
> >>
> >> var rotY: Number =
> >> (mouseY-(stage.stageHeight/2))/(stage.height/2)*(300);
> >> var rotX: Number = (mouseX-(stage.stageWidth/2))/(stage.width/2)*(-300);
> >> camera.x= camera.x+(rotX-camera.x)/5;
> >> camera.y= camera.y+(rotY-camera.y)/5;
> >>
> >> renderer.renderScene(scene, camera, viewport);
> >> }
> >>
> >> what are u doing? the 1st part of the script(2 lines) you are setting how
> >> much distance your planes would have, and where they should turn. try
> >> changing the 300 to some other value.
> >> and finally the last 2 lines of code are move the camera, and setting a
> >> delay time or a tweener effect. change the value 5 for different speeds.
> >>
> >> I think thats all.
> >> u can see a experiment here with this script running:
> >> www.andrevenancio.com/teste2/
> >>
> >>
> >>
> >>
> >>
> >>
> >> Sceneshift wrote:
> >>>
> >>> Hi,
> >>>
> >>> I've just download the latest version of PV2.0 and there seems to be a
> >>> lot of changes to cameras.
> >>>
> >>> What I am trying to do is create a really simple camera orbit, exactly
> >>> like this:
> >>> http://www.whitevoid.com/application.html
> >>>
> >>> I have tried using camera.orbit and a variety of different mouseXY
> >>> algorithyms but I can't seem to get anything that resembles that simple
> >>> "wobble" effect. My planes, viewports are all setup basically so I know
> >>> its something I am doing with the camera.
> >>>
> >>> Any help appreciates!
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/camera.orbit-issue.-tp18513695p18527863.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D@...
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org



Get Hotmail on your Mobile! Try it Now!
_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

Re: camera.orbit issue.

by Hanpan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Opps sorry gordee I forgot to take that out of my code... _stage is just my stage reference, you can just remove that :)

gordee wrote:
Hi
 
what does _stage represent?Gordon Everett

Re: camera.orbit issue.

by gordee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
 
I'm getting a lookAt error. (I am using BasicView)

Gordon Everett


> Date: Fri, 18 Jul 2008 05:40:31 -0700

> From: jon@...
> To: papervision3D@...
> Subject: Re: [Papervision3D] camera.orbit issue.
>
>
> Opps sorry gordee I forgot to take that out of my code... _stage is just my
> stage reference, you can just remove that :)
>
>
> gordee wrote:
> >
> > Hi
> >
> > what does _stage represent?Gordon Everett
> >
>
> --
> View this message in context: http://www.nabble.com/camera.orbit-issue.-tp18513695p18528342.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D@...
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org



Find out how to make Messenger your very own TV! Try it Now!
_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

Re: camera.orbit issue.

by gordee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Sorry!!!
 
I fixed it

Gordon Everett




From: gordee@...
To: papervision3d@...
Date: Fri, 18 Jul 2008 13:52:12 +0100
Subject: Re: [Papervision3D] camera.orbit issue.

 
I'm getting a lookAt error. (I am using BasicView)

Gordon Everett




> Date: Fri, 18 Jul 2008 05:40:31 -0700

> From: jon@...
> To: papervision3D@...
> Subject: Re: [Papervision3D] camera.orbit issue.
>
>
> Opps sorry gordee I forgot to take that out of my code... _stage is just my
> stage reference, you can just remove that :)
>
>
> gordee wrote:
> >
> > Hi
> >
> > what does _stage represent?Gordon Everett
> >
>
> --
> View this message in context: http://www.nabble.com/camera.orbit-issue.-tp18513695p18528342.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D@...
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org





Find out how to make Messenger your very own TV! Try it Now!


Win £3000 to spend on whatever you want at Uni! Click here to WIN!
_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

Re: camera.orbit issue.

by Hanpan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Following up on this, I managed to get the same functionality out of the following code:

var rotX:Number = (stage.mouseX-(stage.stageWidth / 2))*(0.5);
var rotY:Number = (stage.mouseY-(stage.stageHeight / 2))*(0.5);
       
camera.x = rotX;
camera.y = rotY;

camera.lookAt(container);

camera.lookAt(container) MUST be inside the enterFrame or for some reason the camera just pans rather than rotates. Can someone shed some light onto why this has changed?

Re: camera.orbit issue.

by gordee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Cool,
 
thanks for sharing!
 
Got any rendering advice? I'm applying a bitmap to a sphere (a spherical photograph) and then trying to fly the camera round it, or at least halfway round. Its really eating into my processing power!

Gordon Everett




> Date: Fri, 18 Jul 2008 06:15:57 -0700

> From: jon@...
> To: papervision3D@...
> Subject: Re: [Papervision3D] camera.orbit issue.
>
>
> Following up on this, I managed to get the same functionality out of the
> following code:
>
> var rotX:Number = (stage.mouseX-(stage.stageWidth / 2))*(0.5);
> var rotY:Number = (stage.mouseY-(stage.stageHeight / 2))*(0.5);
>
> camera.x = rotX;
> camera.y = rotY;
>
> camera.lookAt(container);
>
> camera.lookAt(container) MUST be inside the enterFrame or for some reason
> the camera just pans rather than rotates. Can someone shed some light onto
> why this has changed?
> --
> View this message in context: http://www.nabble.com/camera.orbit-issue.-tp18513695p18528987.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D@...
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org



Get Messenger on your Mobile! Get it now!
_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org