Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling baseLayerPicker in Viewer messes up pickPosition #9985

Closed
GimpMaster opened this issue Dec 21, 2021 · 2 comments
Closed

Disabling baseLayerPicker in Viewer messes up pickPosition #9985

GimpMaster opened this issue Dec 21, 2021 · 2 comments

Comments

@GimpMaster
Copy link

I found an interesting bug. I've been looking at the Draw On Globe example where you can draw path's and points on the globe based on mouse clicks. The demo was working great but my code had massive alignment issues on where the path's and points were drawn.

I finally tracked it down to disabling the baseLayerPicker on the Viewer. If you set it to false the pickPosition no longer gives good coordiantes. The more you TILT you screen the worse it seems to get.

See the sand case below where all I added was baseLayerPicker: false.

Sandcastle example:

https://sandcastle.cesium.com/#c=nVdtc9o4EP4rOr6cmaEiaZt7IWnnUkIb5pLCBNrMXekkir1gTY3kkWQId5P/fitLxjYveTm+ANLual+efbRaMEUWHJagyDsiYEm6oHk2p1/ztWDSCPP/XSkM4wLUpNEi/04EIRoSCA2Xoi8iHjIjVYdMWaKhZXe5mMoP8r66dMc0XLAVqCEPf8BamrTb5OTVK7RnDBczYqTbIHcK2A9NTAwkRY2h1NweZ00ZUAq9GSq54JE15Z0OUcXAtVRJNHYiQRPPfmgeT1CPT0nwk4uV6hAE0KrdUZamUhmImi6+JReRXFKWgDKYhnHMNboklxozFUnQREhDtFOqOUgnDXvegz3Sn+ZyeM2jGRg8WgGIUcpC6C1AmHMmIjyEKpjLBfRFmpnTPLGBdcNHNtpQGq9SoBe9j+Obs8GXDxe9m+5Fv/vnRNiTp5nI9YlLx1ByYYKlTUrhog9xgbVP7S6W3nuKplECNGVRFORCBEWcVofUjLSKXTTQIV6WkFAmsqxI1/6j1+f9ca9VSKT8HpIR/wc65Gi9GAOfxeYKpqBAhLA2cF5fp92L08vhzXhw8+lq8OXzmdd/yL/zOhOiwGRKOMdcIWygkWJ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hp4NXh69f09cHR7+1yNtf6OHvR0ctcnhwcEAP3FRYu0MLC8FRLtEi9e+me1zt8mSsmNBTqeYFw+Lsqvj9W9o/630e98d/WcVGq3GizSqB90U+/+DzHCyZSgJK2wbmaYJp1+27DB/IhoZ6fbudtKuqJxFfEB692/E4tw8DrXFnmiX5G2vSeH/SRvktVSSPCKs5wEEpYSsrFh++v3CLlNKTNv7drWlcJTcs/wc

Browser: Chrome / Edge

Operating System: Windows

@GimpMaster
Copy link
Author

I should note that if I set viewer.scene.globe.depthTestAgainstTerrain = true;

The pickPosition is accurate...however I then have issues with billboards and points being depth tested against terrain and drawing underneath.

@ggetz
Copy link
Contributor

ggetz commented Jan 23, 2023

I think this is a combination of two other issues. The pickPosition due to depthTestAgainbstTerrain value issue is detailed in #4368. That value being set by Viewer and BaseLayerPicker is discussed in #6991.

@ggetz ggetz closed this as completed Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants