View Single Post
  #1  
Old 05-22-2011, 05:28 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Particle engine modifier "fix"?

This might be more of a question than a feature request, since the issue is kind of strange.

I've noticed this a long while back when fiddling around with particle emitters. The modifiers seemed strange to me because they didn't really do what I wanted. Sooner or later I had figured out that the modification of variables over a given time window is essentially bugged.

Let's say I got a particle and I want to make sure that the alpha of it goes from 1 to 0 in half a second. I'd do something along the lines of this:
PHP Code:
addLocalModifier("range"00.5"alpha""add", -1, -1); 
This will not work as intended, though. The particles will only fade halfway and stop around 0.5 alpha. This is because (I believe) the specified modification values (-1 and -1, to make sure it's always -1) seem to be on a per second base. That means it reduces the alpha by 1 per second. Since we only have a time window of half a second, it will only go as low as 0.5 alpha. This will do what we really want:
PHP Code:
addLocalModifier("range"00.5"alpha""add", -2, -2); 
Works perfectly fine. But I don't like it. It's a hackish thing to do and it just seems strange to me, overall. I know that "fixing" this issue would break tons of code, though. I don't know what could possibly be done. Different function call maybe?
Reply With Quote