What should i do, for the polyline depthFailMaterial will active only by TERRAIN not by custom entity?

const drawPoint = (p: Point) => {
  const position = Cesium.Cartesian3.fromDegrees(p.longitude, p.latitude, p.height)
  p.position = position
  const options = {
    id: p.no,
    position,
    billboard: {
	  ......
      disableDepthTestDistance: Number.POSITIVE_INFINITY,
      depthTestEnabled: false,
    },

    ......
    disableDepthTestDistance: Number.POSITIVE_INFINITY,
    depthTestEnabled: false,
  } as any
  return viewer.entities.add(options)
}

const drawLine = (positions: Cesium.Cartesian3[], preview = false) => {
  const options = {
    polyline: {
      positions,
      width: 3,
      material: preview ? Cesium.Color.fromCssColorString('#dcdcdc') : Cesium.Color.fromCssColorString('#1E90FF'),
      depthFailMaterial: new Cesium.StripeMaterialProperty({
        evenColor: Cesium.Color.RED.withAlpha(0.5),
        oddColor: Cesium.Color.TRANSPARENT,
        repeat: 200, 
        orientation: Cesium.StripeOrientation.VERTICAL,
      }),
      classificationType: Cesium.ClassificationType.TERRAIN,
    },
  }
  return viewer.entities.add(options)
}

What should i do, the polyline depthFailMaterial will active only by TERRAIN not by billboard?

Hi @yantingliu ,

Thanks for your post and welcome to the Cesium community.

I see the red box you outlined in your code, but to ensure we are on the same page can you explain in more detail the behavior you are expecting. It may be helpful to put your sample code into a live example using our sandcastle tool https://sandcastle.cesium.com/

We have this example code in sandcastle Cesium Sandcastle demonstrating the functionality of the polyline.depthFailMaterial property. Do you mind taking a look and then letting us know if the functionality you are seeing in your code lines up with the sandcastle and works how you expect?

Thanks and I hope we can narrow down and resolve your issue soon,

Luke

Hi, @Luke_McKinstry ,

Thanks, very match. I am expecting the yellow polyline’s depthFailMaterial (red line) just be actived by world terrain, but not be actived by billboard (bule point) . As this:

sample code as:

One option is to remove `disableDepthTestDistance: Number.POSITIVE_INFINITY,` from the billboard entity, but there is some tradeoff and it may not be the behavior you want.