Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Cosmic complement! Thank you so much!

I know what you mean about the detection, especially close up. It's a raycast that goes through a point on the hand, eventually hitting a collider on the target. And since I used different models, the point might be a bit different for each one. Whoops. I noticed it too late. Thanks for raising it.

(+1)

Ohhh I thought you were somehow analysing the 2d image on the screen itself, this seems much simpler lol

You got me! I did oversimplify it. 

There are 2 raycasts.
- The first goes between the main camera, through the hand, to a render texture (in Unity) that's on placed on a quad mesh (a 2d image).
- The second takes the position where the raycast hit the quad to then do a second raycast from another camera to where the actual background and target are being rendered.

Not quite analyzing an image, but it's another step. At first, I wanted to do a lot more with the green screen that may have needed this approach. Still, it removes the 3d perspective to make it more screen-like.