Jump to content
Sign in to follow this  
diwako

Particle source in air spawning particles on ground problem

Recommended Posts

I am working on some mission right now in which I want a sky effect at some point. I to spawn the particle source in the air, set pos just in case, and then attach it to an object right next to it via one of "setParticleParams"'s parameters.

 

Thing is, sometimes it works and the effect is in the sky, sometimes it doesn't and particles spawn on the ground. I already have checked the position of the particle source and it is indeed in the air both times. I am kind of running out of ideas and wanted to ask if someone else had similar issues.

My code so far is this, "device" is some object somewhere.

private _pos = getPosATL device;
_pos set [2, _pos#2 + 500];
private _stupidObjectInSky = "Land_HelipadEmpty_F" createVehicleLocal _pos;
_stupidObjectInSky setposatl _pos;
private _skyEffect = "#particlesource" createVehicleLocal _pos;
_skyEffect setposatl _pos;
_skyEffect setParticleCircle [500,[0,0,0]];
_skyEffect setParticleRandom [10,[5,5,5],[0,0,0],0.05,1,[0,0,0,1],1,0];
_skyEffect setParticleParams [["\A3\data_f\VolumeLight", 1, 0, 1], "", "SpaceObject", 1,90,[0,0,0],[0,0,0],0,9.996,7.84,0,[20,30,20],[[0,0,0,0],[1,1,0.25,1],[0.5,1,0.5,0]],[0.08],1,0,"","", _stupidObjectInSky];
_skyEffect setDropInterval 0.1;

I also tried "attachTo" on the particle source, but that just means the whole effect is just gone.

Share this post


Link to post
Share on other sites

Hm. Just today tried similar thing. Seems, same, as it was in Arma 2, IIRC, when you use setParticleCircle, particles will be generated on the ground no matter what, or, as I discovered, on the closest visible surface beneath (spawning big enough object below works, but only when it is visible, as soon I hide it, it's surface become ignored, sadly no workaround here - tested with big VR box). Also I would like to know the solution to this. 

Share this post


Link to post
Share on other sites

at the end of your setParticlePrams array you don't have all optional parameters. some of those are surface related. i'm not sure this is a 100% solution but certainly worth a try.

 

go here to find out about them https://community.bistudio.com/wiki/ParticleArray

 

onsurface is the one. afaik it snaps particles to water surface. so depending how far above sea level you are they snap them to the ground instead. the other one is do make them bounce off surfaces to get for example a piece of stone that acts like a physcal object a little bit.

  • Thanks 1

Share this post


Link to post
Share on other sites

Tested and at least as for me I  can confirm - that is the cause, and setting it to false fixes the problem. As stated under the link, related with circle feature:

 

OnSurface - Boolean. Placing of particle on (water) surface on start of it's existence, default value is true, works only if circleRadius > 0. Circle radius is defined by command setParticleCircle. Works since Arma 3 v. 0.74.

Share this post


Link to post
Share on other sites

Can also confirm it working when setting the optional parameter to false. How ever i think it is mind boggling that it randomly works when the parameter is not set.

Share this post


Link to post
Share on other sites
2 hours ago, diwako said:

How ever i think it is mind boggling

 

you must be new to arma modding :f:

 

but yea. also spaceobjects have forced randomised rotation. it's really sad. imagine what cool things you could do, if you could actually have the space objects upright or even better control the up vector. but yea. arma being arma with its quirks. someone made it random when making this on accident and never changed it. or it's some weird design decision that makes no sense. i don't know...

  • Like 1

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  

×