-
-
Notifications
You must be signed in to change notification settings - Fork 717
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
bad position of 3D model when 3D terrain is enabled #1654
Comments
Here is the code I use.
|
My company would be happy to hire someone to fix this issue |
Maybe the problem is just the altitude bug3.mp4 |
We've just merged a removal of the elevationOffset, it might help (although not high chances). |
Probably related or duplicate of #1294 |
It's still an issue after the latest changes. |
I think on every redraw call you have to grab the elevation with:
a refetch is necessary because in different zoomlevels with different terrain-tiles the elvation-values are not the same. Then there exists the
variable with the center-altitdue. In maplibre the proj-matrix is translated by this value in negative z-direction. So this has to somehow merged into the altitude of the 3d-model. May
do the trick, but did not tested this, just a guess. Note: The jump on the moveend event is, because the center-altitude is only updated at moveend. This is to let the camera in the same height during dragging. Then, on moveend, the zoom-level is recalculated, to let the camera on its position. |
I've assigned a M bounty. |
Hi @HarelM, I am Cuong (call me Stefan) at devs pool. Can I assign this issue? |
Sure! please keep me posted on your progress. |
Sure, thank you |
@HarelM I added queryTerrainElevation into camera.ts. This method allows user to get elevation of a point at specific transform's elevation. Can you check this pull request, thanks Specical thank for your support @hami9x @prozessor13 |
This is demo code that shows 3d model working with |
@manhcuongincusar1 please submit an expense report in open collective in order to get the bounty. |
@HarelM Thank you very much, this is the expense link: https://opencollective.com/maplibre/expenses/128542 |
The position of the 3D model and the map are not synchronized.
The problem appears both in Firefox and Chrome
It is illustrated in the videos below:
bug2.mp4
bug1.mp4
The text was updated successfully, but these errors were encountered: