particle.matrix Author Message
Mardok
Member

 Post: #1 particle.matrix Hi, I have a car + exhaust pipe and smoke particles. Particles have constant velocity x = - 4. Particles matrix = actor.matrix(); But if i'm driving my car - particles direction is still the same, why? What should i do to achieve the desired effect ? PHP Code: ----------------------------------::update() functionif(exhaust_particle->update()){     exhaust_particle->matrix = actor.matrix();}-----------------------------------------------------  (This post was last modified: 02-20-2011 07:10 PM by Mardok.)
02-20-2011 07:03 PM
Harry
Member

 Post: #2 RE: particle.matrix Try add this under exhaust_particle->matrix: exhaust_particle->vel_constant=actor.matrix().angles();
02-20-2011 07:46 PM
Mardok
Member

 Post: #3 RE: particle.matrix No, no effect. I think particle->matrix = actor.matrix should be enough.... but it doesn't work. :(
02-20-2011 11:29 PM
Harry
Member

 Post: #4 RE: particle.matrix In my problem it worked as I want.
02-20-2011 11:53 PM
Mardok
Member

 Post: #5 RE: particle.matrix What was your problem ? Write about... maybe this will help... You said : exhaust_particle->vel_constant = actor.matrix().angles(); But i don't want change vel_constant :/ vel_constant it's defined in my particle file and its only (X: -4)
02-21-2011 12:13 AM
Harry
Member

 Post: #6 RE: particle.matrix I wanted make some dirt under wheels. And it's always behind car when I put this line. It isn't exactly the same situation as yours but I hoped that it help you. (This post was last modified: 02-21-2011 12:26 AM by Harry.)
02-21-2011 12:22 AM
Dandruff
Member

 Post: #7 RE: particle.matrix vel_constant tells what direction it should point at - it takes in a vector (This post was last modified: 02-21-2011 12:29 AM by Dandruff.)
02-21-2011 12:28 AM
Mardok
Member

 Post: #8 RE: particle.matrix (02-21-2011 12:22 AM)Harry Wrote:  I wanted make some dirt under wheels. And it's always behind car when I put this line. It isn't exactly the same situation as yours but I hoped that it help you. Just you got lucky ;]
02-21-2011 12:37 AM
Dandruff
Member

 Post: #9 RE: particle.matrix if you put it vel_constant = -4 you're actually putting vel_constant = (-4,-4,-4) so try harrys solution. also, exhaust_particle->matrix = actor.matrix(); just says that the particle is in the same position as the actor; it doesn't tell the particle what direction it should shoot at. I think you put vel_constant as -4 because of its ambiguous name. To change the particles actual "velocity", i think you would use exhaust_particle->accel->set(x,y,z); (This post was last modified: 02-21-2011 12:57 AM by Dandruff.)
02-21-2011 12:38 AM
Mardok
Member

 Post: #10 RE: particle.matrix I don't need change vel_const... my smoke particle it's defined in Model Editor -> Particle and vel_cons (X= -4) Problem is if i'm rotating my car, particle matrix is still the same, smoke direction is always the same.. :( Look at screenshot
02-21-2011 12:55 AM
Dandruff
Member

 Post: #11 RE: particle.matrix sorry, i edited my post. reread it edit : ah, you said velocity x = - 4... misread, but try harrys solution anyways it should work (This post was last modified: 02-21-2011 01:13 AM by Dandruff.)
02-21-2011 01:01 AM
Member

 Post: #12 RE: particle.matrix If you move the particles position it will effect the smoke particle as well... so the constant velocity is not needed at all what you guys want to believe... try it as test in the editor and move the particle There is always evil somewhere, you just have to look for it properly. (This post was last modified: 02-21-2011 01:48 AM by Dynad.)
02-21-2011 01:47 AM
Mardok
Member

 Post: #13 RE: particle.matrix OK, maybe this example shows you my problem better. I have some Dragster with two turbojet engines - engines spits flames (flames is a particle with cons_vel Z = 5. update--------- { flames_particle.matrix = dragster.actor.matrix(); } update--------- If car goes up then flames is ok (because cons_vel Z = 5), but if dragster goes down then flames still the same direction? What I should do to properly set flame ?
02-21-2011 03:02 AM