1) I've been playing with particle code. In fxparticle.cpp at line 223 there is this code:
- Code: Select all
sFORALL(Particles,p)
{
switch(Para.CreateFlags & 3)
{
case 0:
r.InitRandom(rnd);
break;
case 1:
r.x = rnd.Float(2)-1;
r.y = rnd.Float(2)-1;
r.z = rnd.Float(2)-1;
break;
case 2:
r.InitRandom(rnd);
r.Unit();
break;
}
p->Pos = (sVector31)r;
r.InitRandom(rnd);
p->Speed = r;
p->Time = rnd.Float(1);
}
It initializes particle positions for Ballistic. I wonder is there is a simple way to create a ring emitter with particles oriented outwards?
2) I've also noticed that if we rem out string 241 (i.e. r.InitRandom(rnd); which randomizes particle speed vectors) we can orient particles outwards (in Forward and Fly mode in Chunks)! Thus, by making a switch that excludes this string we can orient particles correctly. I coded the switch, but just can't make it work (no difference if it's on or off). Maybe The Great Master Code Guru could do that properly? Thanks anyway
![Winken ;)](./images/smilies/icon_wink.gif)