Try looking at ease out functions. They give the deceleration over time effect that you want. The only catch is that they start out at full speed. For example:
1.0f - (percent_complete*percent_complete*percent_complete)
Try looking at ease out functions. They give the deceleration over time effect that you want. The only catch is that they start out at full speed. For example:
1.0f - (percent_complete*percent_complete*percent_complete)
Maybe something like this? Try changing parameters and exponents if it’s not quite right.
Via this graph: https://www.desmos.com/calculator/n7f2j3qynj
I don’t think curves are suitable for explosions.
You just give particles a ‘random’ acceleration away from an origin (or apply a force, from an origin) and then simulate drag and gravity.
I agree that particle systems are generally better, but he might be using some kind of single sprite, tweening size/color or something.
I guess you could simulate the drag on the expanding edge of the sprite, but at that point…
I don’t know what he’s trying to accomplish exactly, so I figure I’d go along with the existing conceptual inertia.
It would be used for more like light pulse. So it appears really quickly and slowly fades out. Wouldn’t be used for the particles themselves.
EDIT-----------
Thanks for the replies, for for now I will just stick with hard coded values, since I only have 16 frames to animate. I just coded each value by hand. That looked pretty nicely. I mean, the light goes so fast that you can’t really see much. Probably even linear interpolation would be enough.