[Papervision3D] 3rd person camera
Patrick Matte | BLITZ
PMatte at blitzagency.com
Mon Dec 3 12:10:30 PST 2007
Well the camera will look at your object but if the object moves, you have to move the camera as well
BLITZ | Patrick Matte 310-551-0200 x214
From: papervision3d-bounces at osflash.org [mailto:papervision3d-bounces at osflash.org] On Behalf Of René Lavoie
Sent: Monday, December 03, 2007 11:51 AM
To: papervision3d at osflash.org
Subject: Re: [Papervision3D] 3rd person camera
I've tried that but the camera still doesn't move.
________________________________
De : papervision3d-bounces at osflash.org [mailto:papervision3d-bounces at osflash.org] De la part de Trevor Burton
Envoyé : 3 décembre 2007 14:26
À : papervision3d at osflash.org
Objet : Re: [Papervision3D] 3rd person camera
no, you have to keep calling it when the object moves. that's why i suggested making the camera and object siblings, as this should mean you don't have to
On Dec 3, 2007 7:15 PM, René Lavoie <Rene.Lavoie at sarbakan.com<mailto:Rene.Lavoie at sarbakan.com>> wrote:
I've tried the lookAt() function but it doesn't update the camera position when the character move.
This function is called on the enterFrame of the main container.
public function update(_model:DisplayObject3D):void
{
camera.lookAt(_model));
}
________________________________
De : papervision3d-bounces at osflash.org<mailto:papervision3d-bounces at osflash.org> [mailto:papervision3d-bounces at osflash.org<mailto:papervision3d-bounces at osflash.org>] De la part de Trevor Burton
Envoyé : 3 décembre 2007 13:47
À : papervision3d at osflash.org<mailto:papervision3d at osflash.org>
Objet : Re: [Papervision3D] 3rd person camera
This looks like a lookAt() function to me.... it's not setting the camera's position - it's setting it's orientation - the direction it's looking in. Do you want the camera to point at a particular spot in the scene?
if so use DisplayObject3D.lookAt() for this and pass it the position of a D03D you want to point at.
If you want the camera to point at something that isn't a D03D, then just create an empty (dummy) DO3D and point the camera at that...
if you want the camera to move from pointing at one thing to pointing at another then you'll need to use a SLERP implementation - there has been one posted on the list.
if that's not what you're looking for then let me know.
T
On Dec 3, 2007 6:22 PM, René Lavoie <Rene.Lavoie at sarbakan.com<mailto:Rene.Lavoie at sarbakan.com>> wrote:
Hi everyone,
I'm new to Papervision and new to 3D also. I have to build a prototype to test the possibility of a 3rd person game. Someone gave me the algorithm to set the camera position but I can't figure it out in Papervision class. Is there anybody who can help me with that?
Here's the algo.
Vector3D dir, up, right;
dir = object.dir ;
up.Set (0.0f, 1.0f, 0.0f);
right = CrossProduct (up, desiredDir);
right.Normalize ();
up = CrossProduct (desiredDir, right);
up .Normalize();
cam->SetOrientation (&dir, &up);
Thanks
________________________________
René Lavoie
Programmeur 2D
2D Programmer
Sarbakan
P: +1-418-682-0601 208
F: +1-418-682-2832
Rene.Lavoie at sarbakan.com<mailto:Rene.Lavoie at sarbakan.com>
www.sarbakan.com <http://www.sarbakan.com/>
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org<mailto:Papervision3D at osflash.org>
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
--
Trevor Burton
http://www.paperworld3d.com<http://www.paperworld3d.com/>
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org<mailto:Papervision3D at osflash.org>
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
--
Trevor Burton
http://www.paperworld3d.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20071203/68ee601e/attachment.html
More information about the Papervision3D
mailing list