[Papervision3D] Camera around / following object
nospam at therossman.org
nospam at therossman.org
Tue Jul 21 11:27:33 PDT 2009
Actually this list needs the spirit of:
"hey guys i SEARCHED/GOOGLED THIS FIRST and i couldn't find anything to
help me, do you have any ideas?"
instead of your approach which is:
"i didn't do anything to help myself, can someone just spoon feed me
everything i need?"
come on dude show a little initiative.
i think i speak for most people on this list, when i say, i don't mind
helping people out but you have to AT LEAST TRY on your own first.
> That's the spirit that this list needs... *** irony ***
>
> On Tue, Jul 21, 2009 at 2:52 PM, <nospam at therossman.org> wrote:
>
>>
>> LOL - exactly.
>>
>> > http://answers.yahoo.com/question/index?qid=20080514142637AAwwd2U
>> >
>> > On Jul 21, 2009, at 1:37 PM, nospam at therossman.org wrote:
>> >
>> >>
>> >> lord people.
>> >>
>> >> http://tinyurl.com/nmc3ef
>> >>
>> >>
>> >>> Any examples about that?
>> >>>
>> >>> On Tue, Jul 21, 2009 at 11:33 AM, <nospam at therossman.org> wrote:
>> >>>
>> >>>>
>> >>>> Use the Spring Camera? Isn't that pretty much what it's for?
>> >>>>
>> >>>> Cheers,
>> >>>> mark
>> >>>>
>> >>>>
>> >>>>> Any ideas?
>> >>>>>
>> >>>>> On Mon, Jul 20, 2009 at 4:44 PM, Maggical <info at javierespana.com>
>> >>>> wrote:
>> >>>>>
>> >>>>>>
>> >>>>>> I tried to change this:
>> >>>>>>
>> >>>>>> camera.orbit(cameraPitch, cameraYaw);
>> >>>>>>
>> >>>>>> to this:
>> >>>>>>
>> >>>>>> camera.orbit(cameraPitch, cameraYaw, true, walkingDoll);
>> >>>>>>
>> >>>>>> and it works better, it follows the object, but it seems as the
>> >>>> camera
>> >>>>>> get
>> >>>>>> closer to the object as it moves instead of mantaining a steady
>> >>>> distance
>> >>>>>> to
>> >>>>>> the object... Any ideas?
>> >>>>>>
>> >>>>>> Thanks,
>> >>>>>>
>> >>>>>> Javier
>> >>>>>>
>> >>>>>>
>> >>>>>> Maggical wrote:
>> >>>>>>>
>> >>>>>>> Hi there,
>> >>>>>>>
>> >>>>>>> I've managed to load an object I want to display, and have a
>> >>>>>>> camera
>> >>>>>> that
>> >>>>>>> is
>> >>>>>>> controlled by the mouse movement and wheel that circles around
>> it
>> >>>> and
>> >>>>>>> zooms
>> >>>>>>> in and out... Using this:
>> >>>>>>>
>> >>>>>>> *Listeners:*
>> >>>>>>>
>> >>>>>>> stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoving);
>> >>>>>>> stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheel);
>> >>>>>>>
>> >>>>>>> *Functions:*
>> >>>>>>>
>> >>>>>>> private function mouseWheel(event:MouseEvent):void{
>> >>>>>>> ///
>> >>>>>>> camera.moveForward(10 * event.delta);
>> >>>>>>> }
>> >>>>>>>
>> >>>>>>> private function mouseMoving(event:MouseEvent):void{
>> >>>>>>> ///
>> >>>>>>> var differenceX:Number = event.stageX - previousMouseX;
>> >>>>>>> var differenceY:Number = event.stageY - previousMouseY;
>> >>>>>>> ///
>> >>>>>>> cameraPitch += differenceY;
>> >>>>>>> cameraYaw += differenceX;
>> >>>>>>> ///
>> >>>>>>> previousMouseX = event.stageX;
>> >>>>>>> previousMouseY = event.stageY;
>> >>>>>>> }
>> >>>>>>>
>> >>>>>>> *onEnterFrame:*
>> >>>>>>>
>> >>>>>>> cameraPitch %= 360;
>> >>>>>>> cameraYaw %= 360;
>> >>>>>>> ///
>> >>>>>>> cameraPitch = cameraPitch > 45 ? cameraPitch : 45.0001;
>> >>>>>>> cameraPitch = cameraPitch < 90 ? cameraPitch : 89.9999;
>> >>>>>>> ///
>> >>>>>>> camera.orbit(cameraPitch, cameraYaw);
>> >>>>>>> ///
>> >>>>>>> renderer.renderScene(scene, camera, viewport);
>> >>>>>>>
>> >>>>>>> -------------
>> >>>>>>>
>> >>>>>>> The thing is that I now added some code to be able to move the
>> >>>> object
>> >>>>>>> using
>> >>>>>>> some keys... And the camera seems to be stuck on the same place
>> >>>>>>> and
>> >>>>>> not
>> >>>>>>> follow the object... I need the user to move the object with the
>> >>>> keys,
>> >>>>>> but
>> >>>>>>> that the camera still circles the object pointing at it all the
>> >>>>>> time...
>> >>>>>>>
>> >>>>>>> Any help? I've searched the list but couldn't find an answer
>> that
>> >>>>>> worked
>> >>>>>>> for
>> >>>>>>> me...
>> >>>>>>>
>> >>>>>>> Thanks,
>> >>>>>>>
>> >>>>>>> Javier
>> >>>>>>>
>> >>>>>>> _______________________________________________
>> >>>>>>> Papervision3D mailing list
>> >>>>>>> Papervision3D at osflash.org
>> >>>>>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>> >>>>>>>
>> >>>>>>>
>> >>>>>>
>> >>>>>> --
>> >>>>>> View this message in context:
>> >>>>>>
>> >>>>
>> http://www.nabble.com/Camera-around---following-object-tp24576151p24576249.html
>> >>>>>> Sent from the Papervision3D mailing list archive at Nabble.com.
>> >>>>>>
>> >>>>>>
>> >>>>>> _______________________________________________
>> >>>>>> Papervision3D mailing list
>> >>>>>> Papervision3D at osflash.org
>> >>>>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>> >>>>>>
>> >>>>>>
>> >>>>> _______________________________________________
>> >>>>> Papervision3D mailing list
>> >>>>> Papervision3D at osflash.org
>> >>>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>> >>>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> Papervision3D mailing list
>> >>>> Papervision3D at osflash.org
>> >>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>> >>>>
>> >>>>
>> >>> _______________________________________________
>> >>> Papervision3D mailing list
>> >>> Papervision3D at osflash.org
>> >>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>> >>>
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> Papervision3D mailing list
>> >> Papervision3D at osflash.org
>> >> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>> >
>> >
>> > _______________________________________________
>> > Papervision3D mailing list
>> > Papervision3D at osflash.org
>> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>> >
>>
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
More information about the Papervision3D
mailing list