-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add heading option for a billboard #6165
Comments
This is similar to the issue fixed in #2487, but I believe what's needed is a way to render the billboard parallel to the Earth. This was asked in the forum awhile back, and I haven't been able to find a solution either. Using an entity with a material to display the icon has the desired rotation effect, but doesn't maintain constant pixel dimensions like a billboard. |
@welchyd the billboard is behaving as expected. The reason it seems to be flipping when you tilt the globe beyond a certain point is because the Z axis is now pointing down in screen space (ie the north pole is below the south pole) so the billboard rotates so it continues to point along the positive Z axis. It seems like what you want is to set |
A heading would be awesome! Thanks @hpinkos |
Bumping this one. This feature would be really nice, I'm currently working on an app that shows ships moving around in different directions, and as a workaround I have created polygons instead. but as pointed out these don't scale. So to come around that problem i use PointGraphics instead when zooming out. Billboards with heading seems perfect for the job. I've tried to modify BillboardCollectionVS.glsl to force billboards to lay flat on the ground, but this shader is a bit complex and I'm currently struggling to adjust it to how I want. Could someone else give it a try please? |
now do you have any solution to solve it?? |
I faced this exactly problem and I come to this sollution, see if that suites you too. It's based on updating the rotation of the billoboard acording to camera's actual heading. const self = this;
style.billboard.rotation = new Cesium.CallbackProperty(function (time, result) {
return self.map.scene.camera.heading;
}, false); |
I faced the same issue recently and came up with the following approach to solve this problem in sandcastle. |
when refPos get undefined,the direction is error, do you have any solution to solve it?? |
When I have a billboard with an image that is facing north, I can tilt the camera so the image is flipped. This is not what I would've expected, and there doesn't seem to be a way to keep the billboard's direction locked. Please fix.
Expected behavior - image pointing north:

After a slight camera tilt, it then faces more southward:

At a more extreme tilt, it seems to be pointing into the earth:

I've been able to get it to happen in this workspace:
https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=6f6710474236e3ffb99d41673e7b3632
The text was updated successfully, but these errors were encountered: