activate Terrain exaggeration

Hi,

This may seem an easy question.
But I need to activate the terrain exaggeration, without calling a new Cesium.Viewer...
for now I have:
    var viewer = new Cesium.Viewer('cesiumContainer',{
    terrainProvider: terrainProvider,
    terrainExaggeration : 1.0202
    });

But I need to activate it only at a certain function for only certain data.

therefore what I am trying to do is the following:
initial settings don't have terrain at all.
but at one point I have a function, if clicked, then:
       var terrainProvider = new Cesium.CesiumTerrainProvider({
     url : '//assets.agi.com/stk-terrain/world'
    });
       region = Cesium.GeoJsonDataSource.load('sample.goejson');
    viewer.terrainProvider = terrainProvider;
    viewer.terrainExaggeration = 1.0201;
                viewer.dataSources.add(region);

The terrain will be shown, but not exaggerated.

any thoughts?
Thanks

Hey there,

Terrain exaggeration is currently immutable, which means it can only be set in the constructor options. See the discussion here for why it’s currently like that. There’s already an issue open for making realtime changes here if you want to track this feature.

Thanks!

Gabby

Ah okay, thank you for your answer.
will keep an eye on the link.

Is there already a progress in this issue? It would be great to change the terrain exaggeration while the cesium globe is already processed and visible.
Another question: is it possible to exaggerate tilesets added as aprimitive to theglobe in the same way?

I don’t think there is, but feel free to bump the issue or chime in there:

I don’t know of a way to exaggerate tilesets that way. You could scale them with a modelMatrix but that might not be the same thing. What kind of kind of application are you trying to do that requires this?