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

Billboard rotation accuracy issue #2487

Closed
mramato opened this issue Feb 11, 2015 · 2 comments
Closed

Billboard rotation accuracy issue #2487

mramato opened this issue Feb 11, 2015 · 2 comments

Comments

@mramato
Copy link
Contributor

mramato commented Feb 11, 2015

Paste this into Sandcastle, switch to 2D or CV and then pan/rotate around the map. The arrow points down by default, so the below should make it always point south. However, when you pan around the map, the arrow rotates slightly. It happens in 3D too, but is more noticeable in other modes. @bagnell thinks it's a precision issue in the shader.

var viewer = new Cesium.Viewer('cesiumContainer');
viewer.entities.add({
    position : Cesium.Cartesian3.fromDegrees(0, 0, 0),
    billboard : {
        image : 'http://maps.google.com/mapfiles/kml/shapes/arrow.png',
        alignedAxis : Cesium.Cartesian3.UNIT_Z
    }
});
@emackey
Copy link
Contributor

emackey commented Apr 5, 2017

I'm having an issue with alignedAxis that believe this is the same bug (or at least the demo code above shows the same problem I'm seeing), so I'm adding my demo to this issue. The alignedAxis when viewed off-axis doesn't point quite the right way.

Here's my Many-Aircraft Demo. (It's a cool demo, if we get it working maybe it could be a Sandcastle Showcase demo of VelocityVectorProperty).

When viewed top-down, it looks mostly (but not 100%) correct:

alignedaxistopdown

But the further off-axis you go, the worse this problem gets:

alignedaxissideview

Of course if you make it all the way to 90 degrees off-axis, you get gimbal lock and there's no way it can work. But the problem gets bad long before you reach that point. It feels like it's not taking the off-axis-ness (that's a term) into account properly.

@rahwang
Copy link
Contributor

rahwang commented Apr 11, 2017

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

5 participants