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
In StreetControls, it was hard to implement picking to detect ground.
I did a workaround using method view.getPickingPositionFromDepth to get to picked point on tile layer, and then compute the distance. But code would be clearer if the picking method for TileLayer was homogeneous with other picking method. For example :
Picking on the TileLayer should returns
like other picking method.
Context
In StreetControls, it was hard to implement picking to detect ground.
I did a workaround using method
view.getPickingPositionFromDepth
to get to picked point on tile layer, and then compute the distance. But code would be clearer if the picking method for TileLayer was homogeneous with other picking method. For example :this.view.pickObjectsAt(event, 0, this.buildingsLayer);
works normally, and return all picking information (point, distance, face, object...)
0: {distance: 10.782635729449, point: Vector3, object: Mesh, face: Face3, faceIndex: 5471, …}
1: {distance: 20.35449612122636, point: Vector3, object: Mesh, face: Face3, faceIndex: 5469, …}
2: {distance: 20.42226457707133, point: Vector3, object: Mesh, face: Face3, faceIndex: 5404, …}
3: {distance: 23.65226947256359, point: Vector3, object: Mesh, face: Face3, faceIndex: 5394, …}
this.view.pickObjectsAt(event, 0, this.view.tileLayer);
0: {object: TileMesh, layer: GlobeLayer}
Steps to Reproduce
In StreetControl, method pick,
Add log to see what
view.pickObjectAt
returns in each case, for building layer or for tile layer.Expected Behavior
0: {distance: 10.782635729449, point: Vector3, object: Mesh, face: Face3, faceIndex: 5471, …}
Actual Behavior
0: {object: TileMesh, layer: GlobeLayer}
Possible Cause/Fix/Solution
Picking.pickTilesAt
need to be improvedThe text was updated successfully, but these errors were encountered: