Skip to main content

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

Hey thanks for playing the game! Glad you enjoyed it and happy to see a different take on a similar concept from you aswell.

Interestingly enough making the hole was far harder than getting the grass to work with it. The grass itself is a shader I bought in a Humble Bundle a while back called Brute Force - Grass Shader (link). That shader allows for specific particle effects to interact with the grass and remove spots (for foot prints for example). So I created a circular particle effect around the hole which moves with it and constantly removes the grass.
Now what was more challenging was the hole itself. I have two floors. One floor with a hole, which is just a mesh, since i cant add a mesh collider to it and have it interact with rigidbodys, and making it a convex would break the hole. So i then added a bunch of box colliders around the hole to basically make the hitbox of the floor but leave the hole open. When you press w, a, s, d you move that entire floor with the hole. Since that would also move the golfballs and the grass, I made a second floor sliightly above it which is one big plane. The hole has a capsule collider trigger, and if a ball touches it, the layer of the ball changes which leads to it ignoring the solid floor above and dropping down, then interacting with the floor below which has the hole. If you move away quickly again, the layer switches back and the golf ball goes onto the floor above again.

I hope this explains it! It was a tricky situation with a rather straight forward but weird solution :P