[Papervision3D] Animating camera to target

Gordon Everett gordee at hotmail.co.uk
Tue Jun 23 15:52:35 PDT 2009



I'll vote for that. Its kind of strange/non-intuitive that you pass width and height to the constructor but can't access these properties directly

Regards
Gordon Everett
 
My preferred email address: gordon.everett2 at gmail.com

 My Blog: http://flashgordonmedia.blogspot.com/

 







From: ross.sclafani at gmail.com
To: papervision3d at osflash.org
Date: Tue, 23 Jun 2009 18:46:41 -0400
Subject: Re: [Papervision3D] Animating camera to target

it will work on anything with a geometry property.the do3d with a number of planes does not have its own geometry.the next step would be a recursive fucntion that fround the collective bounding box of all the bounding boxes using traslation matrices etc. but im no zupko. enjoy the plane.i will make other SmartPrimitives and a SmartDAE at some point, but if you beat me to that please post them to the list.OR, we could make enough noise and convince the pv3d elders that even though technically width height and depth properties are misleading on 3d geometry, they are familiar interfaces to needed information and build them into the primitives?
cheers_r
On Jun 23, 2009, at 6:30 PM, eric mcconkie wrote:nice get/set extension...this is awesome...thanks! You have saved me a ton of headache...or at least resolved so many issues....BUT, it seems to only work with prmitives...correct? I ask because i stacked a bunch of planes into a do3D, but get an error when i try:
trace((dodd.geometry.aabb.maxY - dodd.geometry.aabb.minY)*dodd.scaleY);


From: Ross Sclafani <ross.sclafani at gmail.com>
To: papervision3d at osflash.org
Sent: Tuesday, June 23, 2009 9:41:01 AM
Subject: Re: [Papervision3D] Animating camera to target

happy to help.i use a custom class called SmartPlane instead of Planewhich has width and height propertiesi have attached it. enjoy. 
On Jun 23, 2009, at 12:33 PM, Eric McConkie wrote:Omg! This makes my day! I wish I thought of that. This could be the perfect formula. THANKS!
On Jun 23, 2009, at 8:19 AM, Ross Sclafani <ross.sclafani at gmail.com> wrote:

there is no width property of Plane.
try the following:function getPlaneWidth(p:Plane){	with(p){		return (geometry.aabb.maxX - geometry.aabb.minX)*scaleX	}}On Jun 23, 2009, at 11:06 AM, montey wrote:
Thanks Gordon,

I can't seem to be able to get the width of the evt that was clicked on. I
set my click event on the plane  When I try to do a call like this it throws
an error.
My plane consists of a bunch of color materials. which are  set to be
interactive = true

Property width not found on org.papervision3d.objects.primitives.Plane and
there is no default value.

		private function onPlaneClick( evt : InteractiveScene3DEvent ) : void
		{
			//camera.lookAt(evt.target as Plane);
			var targetPlane : Plane = evt.target as Plane
			trace("evt.target = "+targetPlane.width)
			/*var xpos:Number = evt.target.x - evt.target.width/2;
			var ypos:Number = evt.target.y - evt.target.height/2;
			var zpos:Number =  evt.target.z - 100;
			TweenMax.to(camera, .8, {x:xpos, y:ypos, z:zpos, ease:Expo.easeOut});
			camera.lookAt(evt.target as Plane);
			*/
			
			trace("camera target = "+camera.target);
		}

gordee wrote:


If I have understood what you are trying to do, then try this;
interactiveScene3DEvent.target is the plane clicked on;

var xpos:Number = iS3DEvent.target.x - iS3DEvent.target.width/2;var
ypos:Number = iScene3DEvent.target.y - iS3DEvent.target.height/2;
zpos:Number = iScene3DEvent.target.z - 100;

Tweener.addTween(camera, {x:xpos, y:ypos, :z:zpos, time:1});
hth

Regards
Gordon Everett

My preferred email address: gordon.everett2 at gmail.com

My Blog: http://flashgordonmedia.blogspot.com/









Date: Mon, 22 Jun 2009 22:18:15 -0700
From: e_account at mac.com
To: papervision3D at osflash.org
Subject: [Papervision3D]  Animating camera to target


I have 20 planes positioned with z spacing what I'm trying to do is move
the
camera through all my planes as the user clicks on each plane. I'm trying
to
figure out how to do that. I tried setting the camera target to the
clicked
plane but that didn't work. I just want to tween the camera through each
plane like a fly through.

Any ideas please. 
-- 
View this message in context:
http://www.nabble.com/Animating-camera-to-target-tp24158838p24158838.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

_________________________________________________________________
Get the best of MSN on your mobile
http://clk.atdmt.com/UKM/go/147991039/direct/01/
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org



-- 
View this message in context: http://www.nabble.com/Animating-camera-to-target-tp24158838p24167306.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


_________________________________________________________________
Get the best of MSN on your mobile
http://clk.atdmt.com/UKM/go/147991039/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090623/9f673984/attachment.html>


More information about the Papervision3D mailing list