Create a cylinder at a coordinate and point at another coordinate

You could create an animation in various ways (also depending on where the input data for the animation is coming from). In order to apply this to the cylinder, one rough outline of the approach would be

  • split the createCylinderPrimitive method into two parts: One that computes the modelMatrix and one that creates the primitive with the Cesium.GeometryInstance
  • During the animation, use the modified positions to create an updated version of the modelMatrix
  • Assign that model matrix to the GeometryInstance, to update its orientation.

If there are more specific questions, it would probably make sense to discuss that in a new thread.