Quickest way to know if map is currently on terrain mode or not

Hi,
In order to add points to positions where user clicks, I need to know if currently mousing over terrain or not so I can use
viewer.scene.pickPosition
or
viewer.camera.pickEllipsoid,
because points will show wrongly if the right method is not used:

image

Is there any way to know this so I can conditionally use one or the other?

Thanks

Any terrain provider you add in CesiumJS is considered global. So all you’d need to do is keep track of whether or not you’ve added terrain to your scene, right?

If this isn’t the case, can you reproduce your setup in a Sandcastle? See How to share custom Sandcastle examples

Hi again Omar;

I’ve created a sandcastle for you to check my code here;

All you need to do is click on the globe and add points. They look great, right?
Now, click on the basemap selector and scroll to bottom, change the terrain option from ‘wgs84 ellipsoid’ to ‘cesium world terrain’, as in picture:
image

Now, the points look half cut. How can I make sure they always look good, on ANY map mode?

Thanks