Saturday, February 15, 2014

Hey, don't be a SQUARE man...

Working on developing the method to sub-divide the galaxy into the appropriate factions. I started our thinking okay... the galaxy is like a sphere so hey lets sub-divide the sphere...



WTF was I thinking... sphere's are just a PIA to figure out location, volume, size, etc...

...and then... it HIT me!

What about a CUBE??? FY! Let's use a cube and fill it with sub-cubes and whatever systems are in each sub-cube belong to the appropriate faction!

Sweetness..... behold a WIP


So now all that's left is to add a box collider; run an OnTriggerStay and collect the objects (aka systems) that are inside (each box) and they all belong to that faction!

OMG, it's looking like a real flippin' galaxy! super-sweetness!

BTW - I freakin' love this shi, er stuff.... :-)

EDIT: Galaxies are NOT usually inside spheres but laid out in a flat disc like structure and so...


there we have a shiny new "flat" Galaxy dics.

No comments:

Post a Comment