[Papervision3D] Orbiting a FreeCamera3D using parenting...
paul.neave at gmail.com
Wed Apr 16 02:43:47 PDT 2008
You could try creating a DisplayObject3D group but instead of adding
the camera into it, add another DisplayObject3D and move that instead.
Then have an enter-frame loop which positions the camera at the same
coordinates of the child DisplayObject3D.
scene = new Scene3D();
camPos = new DisplayObject3D();
camPos.z = -150;
camPosGroup = new DisplayObject3D();
private function update(e:Event):void
camPosGroup.rotationY = mouseX / stage.stageWidth * 360;
camPosGroup.rotationX = mouseY / stage.stageHeight * 180;
camera.x = camPos.sceneX;
camera.y = camPos.sceneY;
camera.z = camPos.sceneZ;
...or something like that.
Hope that helps,
On 16/04/2008, David Peek <ninjascript at gmail.com> wrote:
> I'm trying to orbit a camera around my scene by parenting it to an
> empty DisplayObject3D and rotation that. For some reason
> transformations applied to the parent (rotations and translations) do
> not seem to be filtering down to the camera.
> Is such a thing possible? I thought there might be some sort of
> updateTransformationMatrix function I should be calling...
> Thanks for any help,
> Papervision3D mailing list
> Papervision3D at osflash.org
More information about the Papervision3D