development     reviews     feed

Gravity Light is Working Again

I went ahead and re-worked how I was implementing light effects, and I think that now I have a much better system going. Basically Farseer lets me define a fixture that is defined as a “Sensor,” and I hook into collision events so that I can call a function every time an object enters or leaves a light. Using those, I maintain a list of fixtures that are currently under a light, and can apply whatever forces or manipulate whatever attributes I want with every fixture on the list. Next up is to get the null light working again, and then I’ll be in pretty good shape for starting to create new stuff.

UPDATE: Score! That wasn’t too bad at all. Now I’m back to the functionality I had before, but it’s more extensible and more stable than it was before.