0 registered members (),
16,302
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Particle movement
[Re: BastovBros]
#293472
10/11/09 18:30
10/11/09 18:30
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
There's an attribute for particle velocity or something like that. Try playing with that. And maybe this could help you:
function p_fountain(PARTICLE* p)
{
VECTOR vTemp;
vec_randomize(vTemp,2);
vec_add(p.vel_x,vTemp);
vec_set(p.blue,vector(random(255),random(255),255));
set(p, MOVE | BRIGHT | TRANSLUCENT);
p.alpha = 100;
p.size = 2;
p.gravity = 0.2;
p.skill_a = 3; // fade factor
p.event = p_alphafade;
}
Ubi bene, ibi Patria.
|
|
|
Re: Particle movement
[Re: croman]
#293481
10/11/09 19:27
10/11/09 19:27
|
Joined: Jul 2008
Posts: 128 Ukraine
BastovBros
OP
Member
|
OP
Member
Joined: Jul 2008
Posts: 128
Ukraine
|
Got an error : "vec_randomize - undiclared identifier" So it does not work. Here is my code, which attributes can I miss? function fade_dust(PARTICLE *p) { p.alpha -= 10 * time_step; p.size += 3 * time_step; if (p.alpha < 0) { p.lifespan = 0;} }
function dust(PARTICLE *p) { //vec_randomize(vecDust, 5); p->vel_x = 1 - random(1); p->vel_y = 1 - random(1); p->vel_z = 0 + random(2); p.alpha = 50 + random(5); p.bmap = sprite_fog; p.size = 7; //p.lifespan = 50; p.flags |= ( MOVE); p.event = fade_dust; }
function particle_start(){ while(1){ vec_set (vecDust.x, vector (20,0,-1)); vec_rotate (vecDust.x, my.pan); vec_add (vecDust.x, my.x); effect (dust, 1, vecDust, nullvector); wait(-0.50);} }
action fly() { particle_start(); ...
a generator of dull questions
|
|
|
Re: Particle movement
[Re: BastovBros]
#293494
10/11/09 21:51
10/11/09 21:51
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
p->vel_x = 1 - random(1); p->vel_y = 1 - random(1); p->vel_z = 0 + random(2);
This part is for moving(adding velocity) your particles. If you dont undertand this code well you should read the litec workshop and manual.
Ubi bene, ibi Patria.
|
|
|
Re: Particle movement
[Re: croman]
#293499
10/11/09 22:18
10/11/09 22:18
|
Joined: Jul 2008
Posts: 128 Ukraine
BastovBros
OP
Member
|
OP
Member
Joined: Jul 2008
Posts: 128
Ukraine
|
2 croman : Well, If you look at any particle of a moving object , you'll see that they remain in their spots after they are created, instead of moving along with the object. And it's very noticable if you stand and then go, since particles are of the proper size if you stand, but seem bigger if you move, because they get closer to the camera (they remain on their initial spots). And "playing" with velocity (p->vel_x,p->vel_y, etc) does not seem to help much.
Last edited by BastovBros; 10/11/09 22:19.
a generator of dull questions
|
|
|
Re: Particle movement
[Re: BastovBros]
#293517
10/12/09 05:46
10/12/09 05:46
|
Joined: Apr 2009
Posts: 248 Philippines
seecah
Member
|
Member
Joined: Apr 2009
Posts: 248
Philippines
|
If you really want to let your particle move in accordance with your model you can use vec_for_vertex function and use the resulting vector in your effect function..
Or for you to have a clue on making particle trails you can try to look at AUM78 as reference under Unanswered Questions..
Hope this helps
Can't is not an option™
|
|
|
Re: Particle movement
[Re: BastovBros]
#293545
10/12/09 10:30
10/12/09 10:30
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,032
Croatia
|
Yea I know that...anyway, you could perhaps create particles with very short life span and make them create faster and in bigger amount. This might give you an effect of particles following your object. Just an idea, I never tried making the particles follow some object on that way you want.
Ubi bene, ibi Patria.
|
|
|
Re: Particle movement
[Re: croman]
#293547
10/12/09 11:14
10/12/09 11:14
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Can you post the code that you already have for your particles? One that positions the particles the way you want. (assuming the model stays still)
Then I'll see if I can make them move with the entity from 'action fly()'.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|