Open PhilippeSymbol opened 9 months ago
Thanks for the report @PhilippeSymbol. Would you be able to include a Sandcastle example that replicates the issue? That would help us give us more context to determine the issue. Thanks!
I have same problem and make the following sandcastle exmaple.In exmaple, when I move, console export erorr command.owner = groundPrimitive; -> command is undefined @ggetz
Sandcastle Example Code: ` const viewer = new Cesium.Viewer("cesiumContainer");
const border = { "west": 121.62921213591129, "south": 24.81999135320948, "north": 24.865129705580536, "east": 121.67205922150731 };
const data = [ [ 121.63778155330164, 24.865129705580532 ], [ 121.6463509706242, 24.860615882618365 ], [ 121.6463509706242, 24.851588228512096 ], [ 121.63778155330164, 24.84707439736872 ] ];
let cartesian3Data = []; for(let position of data){ cartesian3Data.push(Cesium.Cartesian3.fromDegrees(position[0], position[1])); }
let geometry = new Cesium.PolygonGeometry({ polygonHierarchy: new Cesium.PolygonHierarchy(cartesian3Data), vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT }); let instance = new Cesium.GeometryInstance({ geometry: geometry, attributes: { color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromRandom()) } })
viewer.scene.groundPrimitives.add(new Cesium.GroundPrimitive({ geometryInstances: instance, interleave: true, allowPicking: false, appearance: new Cesium.PolylineMaterialAppearance({ material: new Cesium.Material({ fabric : { type : 'Color', uniforms : { color : Cesium.Color.WHITE.withAlpha(0.5) } } }) }) }), 0);
let rectangle = Cesium.Rectangle.fromDegrees(border.west, border.south, border.east, border.north); let entity = viewer.entities.add({ rectangle: { height:0, coordinates: rectangle, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND } });
viewer.zoomTo(entity).then(() => { viewer.entities.remove(entity); viewer.scene.mode = Cesium.SceneMode.SCENE2D; });
let moveHandler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas); let pick = (movement)=>{ viewer.scene.pick(movement); }; moveHandler.setInputAction(pick, Cesium.ScreenSpaceEventType.MOUSE_MOVE); `
When using "non pickable" GroundPrimitive, picking throw an error in GroundPrimitive_updateAndQueuePickCommand command.owner = groundPrimitive; -> command is undefined
with allowPicking: true it doesn't throw
when replacing GroundPrimitive by Primitive, it doesn't throw with allowPicking: true or false, but the rendered frame is not equivalent, there are many artifact a height 0