You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Billboard documentation states that "The aligned axis is the unit vector that the billboard up vector points towards. The default is the zero vector, which means the billboard is aligned to the screen up vector." This indicates that the aligned axis should be a unit vector.
However, if you give the Billboard a non-normalized "unit" vector, that vector is completely ignored and the default is used instead. I think that either:
A) The documentation should clearly state that any non-normalized alignedAxis will be ignored and replaced with the Zero vector.
or better yet,
B) The alignedAxis should not have to be normalized in the first place. The Cesium code can normalize the axis internally if it needs to.
The text was updated successfully, but these errors were encountered:
This sounded familiar so I searched through old issues to refresh my memory and summarize previous work on this topic.
In #4046 I clarified the documentation to specify that aligned axis must always be a unit vector, while adding the ability to use the velocity vector as an aligned axis.
In #5807 the CZML loading code makes sure to always normalize unit cartesian values on load. This was to avoid issues arising from imperfect floating point rounding errors when values are serialized to JSON (i.e. magnitude ends up being slightly above or below 1 at machine precision)
Yeah I was having a similar issue where the magnitude wasn't exactly 1, so it "silently failed" and made the billboards align with the camera instead of just normalizing the vector for me or giving a warning or something. I hope one of my two suggestions could help fix that type of silent failing.
It might be time to start considering auto-normalizing vectors in certain places. The main reason we don't do it is for performance reasons, but I feel like it bites us and our users fairly often.
The Billboard documentation states that "The aligned axis is the unit vector that the billboard up vector points towards. The default is the zero vector, which means the billboard is aligned to the screen up vector." This indicates that the aligned axis should be a unit vector.
However, if you give the Billboard a non-normalized "unit" vector, that vector is completely ignored and the default is used instead. I think that either:
A) The documentation should clearly state that any non-normalized alignedAxis will be ignored and replaced with the Zero vector.
or better yet,
B) The alignedAxis should not have to be normalized in the first place. The Cesium code can normalize the axis internally if it needs to.
The text was updated successfully, but these errors were encountered: