Use Case:
One of my minigames is a paintball FFA match, where the objective is to paint everyone else in your colors. You do so by shooting with your color-gun on players. I expect players to be able to over-paint previous hits from others. The target of the game is having the most color exposed after a certain amount of time (eg with 4 players 10% red, 15% green, 30% pink, 45% yellow).
However, since it’s just a minigame, I’m fine with less-than-ideal solutions. In my worst case solution, hit location is ignored completly (it’s much more random and less fun, because you wouldn’t have to try and hit the non-colored spots).
The question:
- How do I paint a “color splash” on a actor upon being hit?
- And how would I track the coloring? (remember, later hits may paint over previous hits with a different color)
My thoughts so far:
- I thought that displaying the color could be done with decals, but those would probably paint a lot of undesired effects on everything around them. (e.g. when the hand was hit and the character holds his hand in front of his eyes, it would paint the head). Also, we are speaking of thousands of decals here. I’m also not sure how I would calculate the color distribution on the actor with this solution.
- There was something called HitMask in UE3, couldn’t find it for UE4? I think this is what I would need to use?
- Best possible solution of course would be if I somehow could add an color splash at the exact hit location onto the material and later extract how much of which color is on the material. However, I couldn’t find anything that would suggest that it’s possible.
- Maybe I have to collect hit locations upon incoming hits in some data matrix and feed that data to the material? But then I can’t see how this would remotely be accurate, unless the actor’s mesh is a extremely simple object (cube).