*Article with TargetCamera3D targeting mouse selected object:*
http://www.allforthecode.co.uk/aftc/forum/user/modules/forum/article.php?index=4&subindex=2&aid=229


*Article with TargetCamera3D following mouse selected object:*
http://www.allforthecode.co.uk/aftc/forum/user/modules/forum/article.php?index=4&subindex=2&aid=104


So between those two articles you have TargetCamera3D targeting and
positioning.



>From the top of my head I would write something like this and then adjust...

// Away3D setup etc
camera = TargetCamera3D();

sphere = new Sphere();
//sphere position bottom at y 0
sphere.x = 0;
sphere.y = 0;
sphere.z = 0;
scene.addChild(sphere);

// Camera position top at y 1000
camera.x = 0;
camera.y = 1000;
camera.z = 0;

// Targeting
camera.target = sphere;
//or
camera.lookat = new Vector3D(0,0,0);


// Rotations
camera.rotationX = 0;
camera.rotationY = 0;
camera.rotationZ = 0;





On 15 November 2010 01:41, Hjupter Cerrud <[email protected]> wrote:

> Do you want something like this?
> http://www.veritasdigitalstudios.com/Nintendo/dice/06/ im using this
> camera code
>
> camera = new HoverCamera3D();
> camera.distance = 200
> camera.panAngle = 0;
> camera.tiltAngle = 89; <---- try with this, i used 89 cuz on 90 does not
> show anything
>
>
> Sorry for my english :P
>
>
> On Sun, Nov 14, 2010 at 5:56 PM, Miroku <[email protected]> wrote:
>
>> No one can help me?
>>
>> On 8 Nov, 19:13, Miroku <[email protected]> wrote:
>> > Hi everyone,
>> > I have this little piece of code:
>> >
>> > board = new Board(1500,20,1500); //extends Cube
>> > camera = new TargetCamera3D({target: board});
>> > camera.focus = 10;
>> > camera.zoom = 100;
>> > camera.z = -1500;
>> > camera.y = 500;
>> >
>> > away.view.scene.addChild(board); //away it's my UIComponent
>> > away.view.camera = camera;
>> >
>> > and I get this render:http://dl.dropbox.com/u/4064417/away3dboard.png
>> >
>> > When the code is like this:
>> >
>> > board = new Board(1500,20,1500); //extends Cube
>> > camera = new TargetCamera3D({target: board});
>> > camera.focus = 10;
>> > camera.zoom = 100;
>> > camera.z = 0;
>> > camera.y = 500;
>> >
>> > away.view.scene.addChild(board); //away it's my UIComponent
>> > away.view.camera = camera;
>> >
>> > I get this render:http://dl.dropbox.com/u/4064417/away3dtop.png
>> >
>> > Instead, when it's like this:
>> >
>> > board = new Board(1500,20,1500); //extends Cube
>> > camera = new TargetCamera3D({target: board});
>> > camera.focus = 10;
>> > camera.zoom = 100;
>> > camera.z = 0;
>> > camera.y = 10;
>> >
>> > away.view.scene.addChild(board); //away it's my UIComponent
>> > away.view.camera = camera;
>> >
>> > I get this:http://dl.dropbox.com/u/4064417/away3dtop2.jpg
>> >
>> > Why this behaviour? It seems that the camera does not rotate itself to
>> > look at the target object....
>> > How can I solve it?
>>
>
>

Reply via email to