How to make a PolylineArrow laying on the ground?

Hello, Cesium followers.
I recently found that Polyline Arrows lay in a plane that is oriented to be orthogonal to a user’s direction of sight.

So when I try to draw it on the ground the look of a arrowhead is a little strange and it rotates with the camera (you can see it at the Geometry/Polylines sample at Sandcastle).

I’d like to make it look something like the right arrow on the following picture (I’m sorry for a poor drawing - tried to show an arrow that lays on the ground and doesn’t rotate with the camera)

I’m ready to make a new version of PolylineArrow material for my project and for the community. Just need a hint which part of the code is responsible for arrow plane orientation in the corresponding shader.

Can anybody help ?

Thank you in advance.

Vladimir

Hi Vladimir,

The shader code for this material is here: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Shaders/Materials/PolylineArrowMaterial.glsl

Best,

  • Rachel

Thank you Rachel,
when I look through this shader code ( https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Shaders/Materials/PolylineArrowMaterial.glsl)

I can’t see anything that could be responsible for the orientation.

I expect that it probably may be found in polyline vertex shader file

I’m just starting programming shaders and a little hint on where is the code responsible for the orientation could help me very much.

Vladimir