top of page
  • Black Twitter Icon
Search

Blocking off the sea...

As much as I would love for players to swim underneath the water this would add a lot of extra complexity to the creation of the game. One big issue I would have is that I would have to create a new shader for the water which is currently screen space dependant because if the player was to go underneath the water all the effects like the refraction and caustics would disappear. It would also mean that a lot of time would have to go into designing the underwater landscape along with many more assets such as foliage, fish, new rocks, textures, effects and sounds.


Instead of this, I'm using colliders to block the player from going too far out. This does mean that players can go into shallow areas but will never be able to go under the water. To achieve this I could have gone round by hand playing large box colliders but this would be very time consuming and also leave me with hundreds of colliders to have to deal with in the hierarchy. After looking online I found this Free Bézier Path Creator by Sebastian Lague, an amazing game programmer who explores lots of different areas of game development on his YouTube channel. You can see everything the tool can do here:

After downloading the package from GitHub I opened it up in a new Unity project to test the tool before using it in my main project. I then went on to removing folders that I wouldn't need and also changed one of the variables in the code. This change was to the road thickness range from 0-0.5 to 0-100. Although this tool isn't build for creating large colliders along paths I can adapt it to fit that purpose by turning off the road mesh render and adding a mesh collider to the road game object. The tool also allows control over the vertex count so I can make the colliders have less unnecessary edges.

Go check out Sebastian Lague!


Twitter:


Youtube:


Bézier Path Creator:


 
 
 

Comments


For regular updates - SUBSCRIBE!

Thanks for submitting!

  • Twitter

© 2023 by 'Aka'Aka Island Proudly created with Wix.com

bottom of page