Particle animation.

Software: Away3D 4.x

Dlate, Newbie
Posted: 11 June 2013 08:13 AM   Total Posts: 21

Hi,

Since i can find so little documentation about particles im inclined to ask my question here.

I currently set particles on the edge of a sphere. I want the particles to move away from the sphere to all directions.

I have managed to calculate the start and end position. How can i set these?

 

   

Dlate, Newbie
Posted: 11 June 2013 09:15 AM   Total Posts: 21   [ # 1 ]
private function initParticleParam(prop:ParticleProperties):void
  { 
   
//set the position according to bitmap data
   
var durationTotal:int  10;
   
prop.startTime    0// Math.random()*10;
   
prop.duration    prop.index * (durationTotal prop.total); //Math.random() * 4 + 0.1;
   
   
var latLong:Point   savedLatLong[ prop.index ];
   
   var 
control:Vector3D Vector3DUtils.translateGeoCoordinateslatLong.20 latLong.20earthRadius 100 );
   var 
end:Vector3D  Vector3DUtils.translateGeoCoordinateslatLong.xlatLong.yearthRadius 300 );
   
   
prop[ParticleBezierCurveNode.BEZIER_CONTROL_VECTOR3D] control;
   
prop[ParticleBezierCurveNode.BEZIER_END_VECTOR3D] end;
//   prop[ParticleVelocityNode.VELOCITY_VECTOR3D] = particleSpaceVectors[prop.index];
   
prop[ParticlePositionNode.POSITION_VECTOR3D] particleVectors[prop.index];
    
//particleVectors[prop.index];
  


I made the particles work, but i need it to play in reverse. I tried using playbackSpeed = -1 but it just made all the particles dissapear. Also is it possible to show all the particles but make them move slowly after each other. e.g. a stagger effect.

   

Dlate, Newbie
Posted: 11 June 2013 09:54 AM   Total Posts: 21   [ # 2 ]

Has anyone had any progress with LOCAL_DYNAMIC? Because ideally i’d like to be able to move the particles myself…

   

Dlate, Newbie
Posted: 11 June 2013 03:11 PM   Total Posts: 21   [ # 3 ]

Allright i got the solution for my problem. I moved em with bezier curve. Then reversed the animation with tweenlite and animator.update.

   

laoyu2003, Newbie
Posted: 17 June 2013 04:15 AM   Total Posts: 14   [ # 4 ]

The normal way to play reverse I figured out:
animator.autoUpdate = false;
animator.updateDeltaTime(deltaTime);

with deltaTime to be negative.

be sure to make the function updateDeltaTime to be public.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X