[Papervision3D] parenting/grouping

Niall McCormack mailinglists at itsallmememe.com
Mon Sep 3 11:39:45 PDT 2007


Ok - I've been playing with parenting objects, but I can't get it to work
the way I want.

I've got the following code setting up the parenting,

	cameraNull = new Plane(cameraNullMat, 0.1, 0.1, 1,1);
	cameraNull.x = 0;
	cameraNull.y = 0;
	cameraNull.z = 0;

	camera = new FreeCamera3D();
	camera.zoom = 8;
	camera.x = 0;
	camera.y = 0;
	camera.z = 0;

	cameraNull.addChild(camera);

Later I add the cameraNull to the scene using

	scene.addChild(cameraNull);

If I then change the cameraNull x, y, z, rotationX, rotationY or rotationZ
the cameraNull moves, but the child camera does not move at all.

Why is this, can how can I get the camera to inherit the moves?


Cheers
Niall


On 31 Aug 2007, at 14:25, Carlos Ulloa wrote:

Hi Niall,

The camera is an object and can be parented to other using addChild.

C4

On 31/08/2007, Niall McCormack < mailinglists at itsallmememe.com> wrote:
Is it possible to create a null object and parent the camera to it?

This would have the advantage of being able to move the null to get the
main camera shot, but then move the camera about slightly by tweaking one
axis, rather than doing any trigonometry maths to work out how to move the
camera from the current position?

Did that make sense?

It's a common thing in 3d apps, but I just don't know how to do it in
papervision!

Any advice would be great

Cheers
Niall


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



-- 
C4RL05
<font size="1">// <a href="http://carlosulloa.com " target="_blank"
onclick="return
top.js.OpenExtLink(window,event,this)">carlosulloa.com</a><br>// <a href="
http://papervision3d.org" target="_blank" onclick="return
top.js.OpenExtLink(window,event,this)">papervision3d.org</a><br></font>






More information about the Papervision3D mailing list