I was inspired by playing the beautiful Eastshade (an open world painting game) but was disappointed to find no painting minigame, so of course I just had to mock one up myself.
It was originally implemented with the plan of simply using the mouse cursor to paint but then I remembered this plugin which allows the Leap Motion Controller to be used in Garry’s Mod, and again - just had to try it.
How it works is actually really simple!
The player performs a short calibration at the start; by positioning their hand (yes, hand - the brush is just a prop :]) to define 3 corners of the game window. Then their hand can be tracked relative to these to allow painting, with distance from the screen being converted to brush size.
So when the player decides on a perspective to paint a raw, normal screenshot is immediately taken and stored locally. From there it’s just drawing to various render textures in order to ‘reveal’ the part of the image under the brush & applying the selected ‘paint’. I’m using what I learned from the Magic: Anomolies to apply shaders & post-processes to the ‘paint’ to achieve different effects - these different styles are linked to the numpad as a sort of mock artist palette! These render textures caused a lot of issues with them not handling transparency as expected & their lack of documentation - but the end result is so worth it!
I had forgotten just how much fun the Leap is!
We used it for our Tragic Magic jam game and the added physicality is always just a blast!