Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

I used an OverlapSphere to check for any eligible objects around a transform that is positioned slightly in front of the player. If the sphere contains objects that can give points, it adds the value of each objects money value into a new variable, which is then added to the player's score. The money value of each object that gives points is stored in a separate script on their object.

(+1)

Ah, that's cool! I expected some complicated raycasting but I like this simple and elegant solution even better!