A good tutorial for cameras can be found at:
http://www.flashmagazine.com/tutorials/detail/away3d_basics_the_cameras/
The alternatives are to:
1. Use something to tween your variables.
2. Old school it by putting animation code directly into your enter_frame
function where you render. Messy but possible.
3. Use target camera as elguapoloco said see code example in link above
Example of how to do no 2:
private var animation1CamStartX:Number = 0;
private var animation1CamStartY:Number = 0;
private var animation1CamStartZ:Number = 0;
private var animation1CamEndX:Number = 100;
private var animation1CamEndY:Number = 100;
private var animation1CamEndZ:Number = 100;
private var animation1CamXCurrentPos:Number = 0;
private var animation1CamYCurrentPos:Number = 0;
private var animation1CamZCurrentPos:Number = 0;
private function render():void
{
if (bAnmation1Flag){
if (some condition test to check if animation1 is completed
eg animation1CamXCurrentPos >= animation1CamEndX){
bAnimation1Flag = false;
} else {
// do your animating
cam.lookat(new Number3D(0,0,0);
cam.x = animation1CamXCurrentPos;
cam.y = animation1CamYCurrentPos;
cam.z = animation1CamZCurrentPos;
animation1CamXCurrentPos ++;
animation1CamYCurrentPos ++;
animation1CamZCurrentPos ++;
}
}
view.render();
D
On 16 July 2010 16:40, elguapoloco <[email protected]>wrote:
> To allow for smooth transitions with minimal effort: Use a Target
> Camera. Create an Object3D, to use as the camera's target, then just
> animate/tween that object's position.
>
> ath.
>
> Jerome.