Distinguish water from land

I want to try to get the “torus” entity to not spawn in the water but the only difference between land and water that I can think of is the colour but the colour isn’t uniform and even if I could get it to work for everything which humans see as blye I still wouldn’t even know how to detect if the torus is in that blue colour or not. Do you know any alternatives or how to get this one to work?


Hi @MoonAlien822,

You could create a mask in photoshop or similar program by selecting all the bluish coloured pixels.

One way to use it would be to apply it on a high poly sphere in Blender. Then bake it into the vertex colours to be able to select the exact polygons that correspond to water vs land.

From there you can split the sphere into two separate models which you can use in PlayCanvas to accurately detect clicks on land and water. You could still use a single sphere for model rendering and use those two shapes only as colliders.

1 Like

I’ve been trying but I can’t seem to get it to work @Leonidas