EDIT:
EDIT: Found it! My bad. Ignore the rest of this msg.
EDIT:
Hello again.. 🙂
Just out of matter of interest, does the Environment/Bubbles/BubbleStream look correct for you in your renderer? In my system the bubbles rise and rotate (around the sprite center point) but dont rotate around their handle.
I was just wondering if it’s something I’m missing with my renderer.
Cheers.
🙂
No worries! 🙂
I’ve been chasing a couple of other strange bugs, although they might be down to my image “anchor” / “handle” rendering code (or lack of it). The issue I’m chasing is that some sub effects (dependent on the “General Settings” “Auto center” and handle settings in the editor) appear to be offset from their parent effect. I’m pretty sure it’s to do with the “handle” settings for the image or the effect / emitter.
BTW, in “LoadEmitter” in PugiXMLLoader.cpp, line 284. The ANGLE_OFFSET is being loaded / cast as a “bool”.
I think it should probably be an “int”?
i.e.
e->SetAngleOffset (node.attribute(“ANGLE_OFFSET”).as_bool());
should be,
e->SetAngleOffset (node.attribute(“ANGLE_OFFSET”).as_int());
Cheers!
I’ll keep you updated with any other stuff I find. 🙂
Apologies.. the above should be
fabsf(e->GetSpeed()) not just the e->GetSpeed()
Cheers,
TonC
Hi Damucz… 🙂
This library is great, thanks! It’s given us a big “legup”. 🙂
I’m seeing some differences with emitters that use a “stretch” effect though. The effect in-game doesn’t look the same as the effect in the editor.
I think I’ve maybe found the source of the issue:
I notice that in “UpdateSpawns” in TLFXEmitter.cpp (line 1271 approx) the scale is set to something like:
e->SetScaleY((GetEmitterScaleX(0) * e->GetGSizeX() * (e->GetWidth() + (fabsf(e->GetSpeed()) * GetEmitterStretch(0) * _parentEffect->GetCurrentStretch()))) / _image->GetWidth());
where the GetEmitterStretch(0) is multiplied by the e->GetSpeed() term…
and in “ControlParticle” in TLFXEmitter.cpp (line 1704 approx) the scale is then set to:
e->_scaleY = (GetEmitterScaleX(e->_age, (float)e->_lifeTime) * e->_gSizeX * ( e->_width + (Vector2::GetDistance(0, 0, e->_speedVec.x, e->_speedVec.y) * GetEmitterStretch(e->_age, (float)e->_lifeTime) * _parentEffect->GetCurrentStretch()))) / _image->GetWidth();
where the GetEmitterStretch(0) is multiplied by the Vector2::GetDistance(0, 0, e->_speedVec.x, e->_speedVec.y) term.
If I change the Vector2::GetDistance(0, 0, e->_speedVec.x, e->_speedVec.y) calls to e->GetSpeed() the effect looks the same as in the editor.
What do you think?
Thanks again for the lib. 🙂
TonC.