thats because, (as explained not a week ago)
you need to define per CurveSegment 3 number3D's
say you want to go to A to C
you need to define the number3D per sequences of 3 Number3D's.
a ab b --> first CurveSgement
b bc c --> second CurveSgement
ab and bc being same directional vectors as in flash native curveto
just make a loop that reuse the last number3D
Fabrice
On Jul 13, 2009, at 9:13 PM, desgraci wrote:
i was but i got a null object error, dunno why
private var pathanimator:PathAnimator;
private var aPath:Array = [
new Number3D(-5000, -5000, -10000),
new Number3D(-5000, 0, 0),
new Number3D(5000, 0, 0),
new Number3D(5000, 5000, -10000),
];
private var path:Path = new Path(aPath);
private var bola:Sphere = new Sphere();
private var inito:Object = {duration:5000,
lookat:false,
aligntopath:true,
targetobject:null,
offset:new Number3D(0,100,0),
rotations:null,
fps:24,
easein:false ,
easeout:false};
scene.addChild(bola);
pathanimator = new PathAnimator(path,bola,inito);
pathanimator.update(0.5);
On 13 jul, 14:04, Fabrice3D <[email protected]> wrote:
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?