I’m trying to learn how to use Particle System and i need some help.
Please, check this project.
When a player is loaded, press C and fireball appears.
I don’t know why, but the first time you cast fireball the game “freezes” for a moment. Is there a way to avoid it?
Also i want to ask about performance with particle systems.
What should i pay attention to if i want my game works fast and particles looks great? I think particles count and emission rate are the most important parameters influence of game performance.
Thanks in advance.
As the entity is disabled on launch, the components don’t get initialised until it is enabled for the first time which may mean some shader compilation, hence the frame drop. (@dave should know more). To get around this, you can have it enabled on start of the application (out of the camera view) and disable it on postInitialize.
On a side note, when you clone an entity, you need to give it a parent otherwise it shouldn’t be shown. I don’t know how it’s working now but you should change the Paladin.prototype.castSpell to: