why don't you try the PathAnimator?
Its specially designed to do exactly this!
Fabrice
On Jul 13, 2009, at 7:45 PM, desgraci wrote:
ok, im confused cause the away3d system has a y for z axis, so i was
tryng to make a directional tweener in a 3d space, and several issues
came up,
public function animacion1():void{
var rx:Number= new Number(Math.round(Math.random() *
(10000)) -5000);
var ry:Number= new Number(Math.round(Math.random() *
(10000)) -5000);
var rz:Number= new Number(Math.round(Math.random() *
(10000)) -5000);
var rt:Number= new Number(Math.round(Math.random() * (200))
-100);
var randomangle0:Number= new Number((Math.pow(rx,2)+Math.pow(rz,
2)+Math.pow(ry,2)));
var randomangle1:Number= new Number(Math.round(Math.sqrt
(randomangle0)));
var randomangley:Number=new Number(Math.round(Math.acos(ry/
randomangle1)));
var randomanglez:Number=new Number(Math.round(Math.acos(rz/
randomangle1)));
var randomanglex:Number=new Number(Math.round(Math.acos(rx/
randomangle1)));
Tweener.addTween(model,{time:rt/10,rotationY:((randomangley*360)/
3.14159265358979)
,rotationZ:((randomanglez*360)/3.14159265358979),rotationZ:
((randomanglez*360)/3.14159265358979)});
trace("movimiento1");
Tweener.addTween(model,{delay:rt/10,time:(9*rt/
10),x:rx,z:rz,y:ry,onComplete:animacion2});
}
i just dont get that the model point to the place it goes, i have
tried several combinations, but not luck, also the rotation is well,
overreacted (not in speed but in spins), and the delays between
animation 1 and 2 takes waayyy too much time (anim1=anim2 expect for
the onComplete ofc)..., how can i fix this?