-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Camera "look at" with adjustable height #12563
Comments
Hi @Bulisor, Thank you for using mapbox-gl-js. You can change the camera altitude with FreeCameraOptions: const camera = map.getFreeCameraOptions();
const position = [138.72649, 35.33974];
const altitude = 3000;
camera.position = mapboxgl.MercatorCoordinate.fromLngLat(position, altitude);
camera.lookAtPoint([138.73036, 35.36197]);
map.setFreeCameraOptions(camera); I'll close the issue, but feel free to reopen if you have any questions. |
Hi @stepankuzmin , thank you for your response. Unfortunately, this is not what I'm seeking. When using this option, the camera simply zooms out on the target, and I do not desire that. Instead, I would like the same zoom level, but positioned at a specific distance above the ground along the Y-axis. I hope I have explained it more accurately. |
Hi there, this looks like a duplicate of #3552 to me? |
Yes, this is a duplicate of #3552. |
Motivation
Hi,
I am using Mapbox with babylonjs to display 3d buildings on map. It is working very well so far.
I was wondering if there is a way to set the camera "look at" position at a different height, or to change the height of the camera target. Currently, it seems that the camera always looks at the target at 0 height
The ability to set the camera height for the "look at" feature would provide more flexibility and enhance the user experience for all who are using 3d on mapbox.
https://prnt.sc/ql8hlW1CMFAU
Thanks
The text was updated successfully, but these errors were encountered: