PDA

View Full Version : Particle system code



DaaxGhost
December 13th, 2008, 03:56 PM
Ok. Well, I've been workin on a particle system with a single particle and i get an error on this part...


// Update particle's movement according to environment
m_Velocity = m_Velocity - Environment.getInstance().Gravity
+ Environment.getInstance().Wind;

I wanted it so that the particle is affaected by wind and gravity in the environment.

And if I don't have that line I can't continue and make an Environment without errors.

Amit
December 13th, 2008, 04:08 PM
If this is Halo related, it should go in the CE Editing sextion.

DaaxGhost
December 13th, 2008, 04:15 PM
If it was Halo related I would know where to put it.

Kornman00
December 13th, 2008, 04:39 PM
Well...it would help if you specific the exact error other than saying 'oh and btw there is an error on this line'


Singletons, yuck

DaaxGhost
December 13th, 2008, 05:10 PM
true. sorry.

Anyway it is saying it after I put


{
// Create particle at given position
m_Position = pos;
// Set particle's speed to given speed
m_Velocity = vel
// Set particle's color to given color
m_Color = col;
// Make sure starting age is valid
if (life < 0)
m_Life = 0;
else
m_Life = life;

...wow. I'm stupid sorry. I got it.