Camouflage
The user looks different for each player because it uses each client’s input and renders to them individually with camera magic.
Fragmentation
Required much more mathematics than I was expecting. Took a while to get it to work on every surface and at every angle but it works exactly as intended now and it can fragment any part. Also made the sniper which produces the fragmentation, as well as the (working) chess board in the image.
Things to note, if you’re wondering why the fragment is smaller than usual it’s because it can only be as big as the part you’re shooting, therefore everytime you shoot the same part, the fragments will get smaller and smaller (I’ll try and fix this at some point). Also it only fragments one part a time, so if there’s another part behind it then that one won’t be fragmented.
Not going to open source it just yet however I plan to once I’ve done ironing out some of the minor issues with the fragmentation and optimized the camouflage (Increasing its resolution causes major FPS drop at the moment).
Assuming you just cut a box out of a part, what I did was simply make the fragmentation not do anything if the box is outside the part.
That way, to fragment multiple parts, you just call the function for every part nearby (using eg FindPartsInRegion) and the ones that should be fragmented, will end up being fragmented.
I decided to publish my current (cleaned up) version as a module (Ive made multiple versions over time, my goal for this was to get rid of repeated code so its quite short):
Yeah I see, yours does look a lot cleaner than mine. Mine doesn’t exactly cut out a defined box so it’s a bit different to your method. I said I wasn’t going to open source mine right now but I probably won’t work on it much so here it is: http://pastebin.com/GuBQYEuJ
Probably but it was just a fun 10 minute project, I don’t plan to use it for anything in particular so I didn’t really see a reason to focus on optimizations at the time.
I scripted it to work for only one player but I could easily adapt it to work with multiple players, I’d just have to make it ignore other players with the camouflage also active. I’ll probably add that to the place today or tomorrow when I have some time.