Lesson 19 help

Started by
1 comment, last by thiodor_del 21 years, 3 months ago
Well last week i''ve started with the particle machine from lesson 19 and after i have finished it i wanted to make some mods.I want to have in my title bar of the window the FPS and how many particles are in the scene.With FPS i had no problem,but with particles i had a lot.I couldnt figure how to make it! Any help? Thanks
:)
Advertisement
It depends on what value you want to get - the total number of particles is consant - if you want to get the total number of live particles you could go through the particle array and count up how many particles that have life >= 0. Or you could just as easily count up how many particle have life < 0 and subtract form the total particles, which would be faster. The thing you have to realize though that is every particle is always drawn - as soon as you check for life < 0 you reset the particle and thus redraw it(hope that makes sence). The only thing is that these newly recreated particles dont move.
Thanks man,how sipmle and i couldnt make it !
Bye
:)

This topic is closed to new replies.

Advertisement