
As you can see, the 3d object is placed flat on the water. This happens when I apply the terrain using the JS code:
const worldTerrain = Cesium.createWorldTerrain()
viewer.terrainProvider = worldTerrain;
(Note: terrains besides water renders fine with this method.)
However, what I am trying to achieve is this:

Unlike the first image, height exists in water and the object is submerged.
I can only get this result by going into the
and turning Cesium World Terrain option on.
Shouldn't this be achievable by code? Is this a bug or did I miss something?