[Papervision3D] camera rotation
Tyler E
tyleregeto at hotmail.com
Tue Nov 27 08:49:27 PST 2007
Hi, a while ago a released a class for animating the position of camera's,
specifically across Bezier curves. Heres the post to that.
http://www.nabble.com/Bezier3D-animation-class-for-download-t4825620.html
Bezier curves animation Now that wont solve your problem, however I have
been working on an update for that class specifically for the problem you
bring up in this post. In the update you will be able to animate what the
camera is looking at as well as the position. It's working quite nice with
FreeCamera's.
I will be release that either today or tomorrow. I will try to get it posted
on here, but if not you can watch for it on my site at www.TylerEgeto.com.
Then if you want to see how, you can pull my code apart, or just use my
class it as is. Hopefully that is some help to you.
dizy wrote:
>
> Thanks Tim for taking your time to reply to me.
>
> I understand the difference between the two cameras. But I guess Im just
> used to the idea that if you target the camera at some object.. you can
> still roll around that target line while continuing to point at the
> target. Which is the way it works in after effects at least :/
>
> So heres an example...
>
> var container : Sprite = new Sprite();
> container.x = stage.stageWidth * 0.5;
> container.y = stage.stageHeight * 0.5;
> addChild(container);
>
> var scene:MovieScene3D = new MovieScene3D(container);
>
> var p : Plane = new Plane(null, 240, 240, 2, 2);
> p.x = 500;
> p.y = 0;
> p.z = 0;
> p.rotationZ = 45;
> scene.addChild(p);
>
> /* I guess I can't use Camera3D
> var camera:Camera3D = new Camera3D();
> camera.x = 0;
> camera.y = 0;
> camera.z = -500;
> camera.target.x = p.x;
> camera.target.y = p.y;
> camera.target.z = p.z;
> camera.target.rotationZ = p.rotationZ; // doesn't work
> camera.rotationZ = p.rotationZ; // doesn't work
> camera.roll(p.rotationZ); // doesn't work
> */
>
> var camera:FreeCamera3D = new FreeCamera3D();
> camera.x = 0;
> camera.y = 0;
> camera.z = -500;
> camera.lookAt(p);
> camera.roll(p.rotationZ); //OK, works the way expected
>
> scene.renderCamera(camera);
>
>
> Ok.... so it seems I can't use Camera3D to do what I want.... so then the
> question is... how do I go about animating the FreeCamera "lookAt"?
>
> Or perhaps theres a better way to approach this problem all together?
>
> Any thoughts?
>
> TIA
>
> Danny
>
>
>
>
> Tim Knip-2 wrote:
>>
>> Hi Dizy,
>>
>> Here's the list's archive:
>> http://osflash.org/pipermail/papervision3d_osflash.org/
>>
>> About the camera's:
>> Camera3D is camera with a 'target', whilst FreeCamera3D is, well, a
>> free camera :-)
>>
>> You position your camera anywhere in space by:
>> camera.x = ...
>> camera.y = ...
>> camera.z = ...
>>
>> Call camera.lookAt( someObject ) to make the camera look somewhere.
>> Or you can do 'by hand' using camera.yaw / camera.pitch.
>>
>> Also note that in Papervision3D the Y-axis is 'up'.
>>
>> So, say you have an object which lies in the XZ-plane and you would
>> want to see the 'right side' of the object, you would do something
>> like this:
>>
>> camera.x = 1000;
>> camera.y = 0;
>> camera.z = 0;
>> camera.lookAt( myObj );
>>
>> Tim
>>
>>
>> Tim
>>
>> 2007/11/26, dizy <dizy at dizy.cc>:
>>> First let me say that this is my first post, and I'm not sure if theres
>>> anyway to search through previous posts for possible answers. So if
>>> there is
>>> a way, please let me know so I can search before asking.
>>>
>>> I'm new to papervision.. and I've been checking out the examples. So
>>> after
>>> playing around with the PaperCloud example I have a question...
>>>
>>> Is there anyway to tilt Camera3D? Something like rotationZ only seems
>>> to
>>> be working for me with FreeCamera3D
>>>
>>> Basically I was trying to get the current example's camera to not only
>>> goto
>>> and target the clicked object... but to also match the object's rotation
>>> so
>>> that the artwork is viewed right side up and straight.
>>>
>>> Any help is appreciated
>>>
>>> TIA
>>>
>>> Danny
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
>
-----
Tyler Egeto
My site is http://tyleregeto.com TylerEgeto.com - Feel free to drop by.
--
View this message in context: http://www.nabble.com/camera-rotation-tf4874316.html#a13974495
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list