Jump to content
Sign in to follow this  
sxp2high

Force Particle Move Velocity / Dir? (Ignore Wind?)

Recommended Posts

Hi all,

I'm not very experienced when it comes to particles. I'm trying to get a particle (smoke-like) to only move into a specific dir (the dir of the source object - 180).

Unfortunately it always moves south and if I change the wind, it changes accordingly to the wind. How can I force a Dir?

I have a Move Velocity of [0, -20, 0], so it should always move south relative to the object, right? Doesn't work for me.

Here's what i got:

_startGate = testGate;

_kawooshPos = (_startGate modelToWorld [0, 0, 0]);
_kawooshSource = "logic" createVehicleLocal _kawooshPos;
_kawooshSource setPosATL _kawooshPos;
_kawooshSource setDir (getDir _startGate);
sleep 0.001;
_kawooshParticle = "#particlesource" createVehicleLocal (getPosATL _kawooshSource);
_kawooshParticle setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13,0], "", "Billboard", 0.4, 0.01, [0, -1, -0.25], [0, -20, 0], 0, 1.275, 1, 0.5, [2.6, 0, 0], [[1, 1, 1, 0.8], [1, 1, 1, 0.7], [1, 1, 1, 0.7]], [500], 0, 0, "", "", _kawooshSource];
_kawooshParticle setParticleRandom [2, [0, 0, 0], [0, 0, 0], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 0];
_kawooshParticle setDropInterval 0.002;

This is what i mean:

particleprob.jpg

Share this post


Link to post
Share on other sites

Did you try putting a couple giant fans behind it?

sorry, couldn't help it... I believe that particles always obey the wind, could be wrong, but supposedly you can change the wind vector with setWind http://community.bistudio.com/wiki/setWind. Don't know if it will help, haven't touched this command in nearly 2 years :D

---------- Post added at 06:53 PM ---------- Previous post was at 06:52 PM ----------

Oh my bad, you tried setwind, that's what happens when I read on a cell phone :(

Share this post


Link to post
Share on other sites

Yea, thanks, I tried setWind to test it's behavior.

I could, however, use setWind to my advantage. Your "giant fans" idea crossed my mind before. Because the particle is only there for a short moment I could use setWind to get the desired effect. But that's a bit annoying to write. Figuring out the wind dir relative to the source object dir. Possible but annoying. :D :D

I was hoping for something easier to be honest. :rolleyes:

But if you're right, and "ignoring wind" isn't possible I have to go with that.

Share this post


Link to post
Share on other sites

[0,20,0] would make it shoot upwards 20m/s. the vector is a little different in the particle array, it is [x, z, y] not [x, y, z] like everywhere else. Also setting "rubbing" to 0 would stop the wind from affecting it. Rubbing:

_kawooshParticle setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13,0], "", "Billboard", 0.4, 0.01, [0, -1, -0.25], [0, -20, 0], 0, 1.275, 1, >>>>0.5<<<<<rubbing, [2.6, 0, 0], [[1, 1, 1, 0.8], [1, 1, 1, 0.7], [1, 1, 1, 0.7]], [500], 0, 0, "", "", _kawooshSource];

Share this post


Link to post
Share on other sites

Thanks for the reply.

The move velocity array is definitely [x, y, z]. If I use [0, 0, 20] it goes up in the air. (Maybe BIS "fixed" the array order at some point?)

You are generally right about rubbing.

0 Rubbing means it wont move ... BUT if you have move velocity, it's the opposite. The more rubbing = The less move velocity. Makes sense since there is more resistance, holding the particle back.

So if I use a rubbing of 10 it's barley moving. But that doesn't look right for what I'm trying to accomplish. It's just a floating, wobbling cloud. I want it to move. But into a specific direction, regardless of the wind. :(

This is what I'm trying to get:

Share this post


Link to post
Share on other sites

Not sure at all about applying this to particles... but try this maybe....

_ang = 250;   //direction...[s] may need to use opposite of this angle... _ang = (_ang + 180) mod 360[/s]
_vel = 5;     //velocity

_velvec = [b][(_vel * (sin _ang)),(_vel * (cos _ang)),20][/b];

Edited by twirly
Clarity

Share this post


Link to post
Share on other sites

You got it man! Exactly what I needed - works perfectly! Many many thanks! :yay:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×