[CLOSED] Adding animation(s) dynamically to particles

Software: Away3D 4.x

LeoBergmann, Newbie
Posted: 21 August 2013 09:17 PM   Total Posts: 6

Hi everyone,

I’ve started using the particle system inside of Away3D 4.1 and am trying to something like a simulated dynamic simulation out of it…but I’m quite stuck as I can’t find any examples for advanced use of the animation tools with particles.

As explanation:

I’ve got a grid of planes used as particleMesh, the grid is created with the addAnimation command and then the init function passes the x, y and z values to the single particles.
Now I got the idea to click somewhere around the particle grid and the particles should start to move torwards the clicked point, getting their acceleration value or velocity based on the distance to the center of the particle grid.

The advanced particle tutorial here on away3D has a solution that seems to get into the right direction but isn’t dynamically but defined on start.

So, is there a way to achieve such effects like I’ve described? And if so, might someone with much greater knowledge be so kind to point me in the right direction?

I’d appreciate it. I’ll keep on trying myself and will post a solution here if I might stumble upon one.

Thanks.

Cheers, Leo

   

Avatar
dottob, Jr. Member
Posted: 22 August 2013 01:33 AM   Total Posts: 49   [ # 1 ]

I am not so good at the Particle System,but maybe this can be reference,it’s from Cheng Liao’s TheAdvancedDemo,TheBasicTutorial :

private var state:int=1000;//set to end state
...
var timer:Timer = new Timer(1,1000);
  timer.addEventListener(TimerEvent.TIMER, onTimer);
  timer.start();

private function onTimer(e:Event):void
  {
 
if(state>=5){
  state-=50;//like playback
  animator.update(state);
  }else{ 
  animator.stop();
  e.target.removeEventListener(TimerEvent.TIMER, onTimer);
  }
  trace(state)
 
  }
...
private function initParticleParam(prop:ParticleProperties):void
  {
  prop.startTime =0;//Math.random()*10,I changed here
  prop.duration = 1
 
  var degree1:Number = Math.random() * Math.PI * 2;
  var degree2:Number = Math.random() * Math.PI * 2;
  var r:Number = 600;
 
  //set the position according to bitmap data
  prop[ParticlePositionNode.POSITION_VECTOR3D] = data[prop.index];//postion want be moveto
  //set the velocity
  prop[ParticleOscillatorNode.OSCILLATOR_VECTOR3D] =new Vector3D(r * Math.sin(degree1) * Math.cos(degree2), r * Math.cos(degree1) * Math.cos(degree2), r * Math.sin(degree2),10);
 
  }//postion beginning

 

File Attachments
TheAdvancedDemo.as  (File Size: 9KB - Downloads: 531)
TheBasicTutorial.as  (File Size: 6KB - Downloads: 404)
   

LeoBergmann, Newbie
Posted: 28 August 2013 11:14 AM   Total Posts: 6   [ # 2 ]

Thanks for your input,

I tried it and it seems that the particle system isn’t the right choice for me, since I tried to get a real dynamically simmed system.

I switched over to using awaydynamics with a lot of rigidBodies.

But thanks for reading and taking the time to help me get to a solution.

Cheers, Leo

 

   

lourencohen, Newbie
Posted: 16 October 2014 10:12 AM   Total Posts: 2   [ # 3 ]

I am new with Particle System and not so familiar with the features of the Particle System techniques. But I am sure you will be able to fix this issue soon with the help of experts in this system. Please share us how you are able to fix this issue.

Louren
powered files

 

   
   
‹‹ Live textures

X

Away3D Forum

Member Login

Username

Password

Remember_me



X