Ogre Version: 13.4.4
Operating System: Windows 11
Render System: OpenGL
Hi everyone
I'm using particle systems for rendering a firearm bullet explosion, but I've got 2 problems:
PROBLEM 1
When the bullet explode the explosion particle system starts more or less 1 second after the hit. Checking the explosion tutorial I tried with this:
Code: Select all
void hpms::ParticleAdaptee::GoToTime(float time)
{
Check();
ogrePS->fastForward(time);
}
Where ogrePS is an instance of Ogre::ParticleSystem, but also calling GoToTime(1.0) it seems not working.
This is the .particle file, and setting the emitter emission_rate higher (10 for example) the problem doesn't occurs (but I'd like to understand why the fastForward doesn't work)
Code: Select all
particle_system GunFX/ShotExplosion1
{
material FX/Explosion
particle_width 1
particle_height 1
cull_each true
quota 1
billboard_type point
sorted true
emitter Point
{
angle 180
duration 1
emission_rate 1
time_to_live 1
direction 0 0 0
velocity 0
}
affector ColourFader
{
alpha -1
}
}
PROBLEM 2
The particle system uses an animated texture, with this material:
Code: Select all
material FX/Explosion
{
technique
{
pass
{
lighting off
scene_blend add
texture_unit
{
anim_texture Materials/E.png 16 1
}
}
}
}
On first hit it's ok, the explosion starts at image E_0.png and ends on E_15.png. But if I try to shot again, seems starting on the middle and finishing on the middle of animation. This is very strange, because I create a new particle system foreach bullet when there's a collision, and I destroy it after 2 seconds, so I cannot understand why the animation doesn't start every time at frame 0.
Thanks for help in advance
Ray