[quote:262t7gxu]At this rate, you're going to be one of the forum math people!
hahah I hope not. I suck badly at maths. I was just lucky I figured this out!
[quote:262t7gxu](I'm still working out how you did this - haven't had much time lately, but I think I'm getting the idea.)
I'll try and comment how I did it for the next version. I rarely comment my stuff when I'm hacking away at it but I really need to with this so I can remember in a years time what the hell those formulas were
[quote:262t7gxu]By the way, I'm trying to work out if objects are shadowed in the game I'm making (for a situation where a swarm of small objects have to hide from light). I was using instant-hit bullets or LOS objects to detect whether they're shadowed, but there should be a way to adapt this method to work it out, right? I might try it sometime this week.
(Unfortunately, 'Object is overlapping shadow' doesn't work - I guess distorted objects don't count for collision purposes!)
At this rate, you're going to be one of the forum math people!
(I'm still working out how you did this - haven't had much time lately, but I think I'm getting the idea.)
By the way, I'm trying to work out if objects are shadowed in the game I'm making (for a situation where a swarm of small objects have to hide from light). I was using instant-hit bullets or LOS objects to detect whether they're shadowed, but there should be a way to adapt this method to work it out, right? I might try it sometime this week.
(Unfortunately, 'Object is overlapping shadow' doesn't work - I guess distorted objects don't count for collision purposes!)
As I was reading that I was immediately thinking "try collision detection with the shadows" but you say they don't work eh... damn. Right... just tried LOS... here you go. Although it depends what you class as "being in shadow"...
http://willhostforfood.com/users/P/procrastinator/circleshadowcaster_v0.41-LOS.cap