[Bug] Inconsistent world coordinates returned by pickObject method
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
Description
When using the pickObject method to transform screen coordinates to world coordinates, the resulting coordinates (x, y, z) vary slightly and seem to be influenced by the position of the camera. This inconsistency makes it difficult to accurately interact with 3D objects on the map.
I have a 3D object with a fixed height of 15. However, the unproject method returns slightly different z values for the same point, even though the height should consistently be 15.
Here are some example coordinates that were obtained when hovering over a 3D object on the map. The object has a fixed height of 15, but the z values returned are slightly different each time:
Expected height: 15
Unprojected coordinates:
(3) [14.967373591089833, 55.215464098258174, 15.006034213629]
(3) [14.967371362548931, 55.21546726508324, 15.00713966500024]
(3) [14.96737136262501, 55.215467265098205, 15.00713966500024]
(3) [14.967368298183448, 55.21547185649847, 15.008745031010902]
(3) [14.967368298269019, 55.215471856518064, 15.008745031010902]
(3) [14.967366348143466, 55.2154759730605, 15.009797201422398]
(3) [14.967366348237713, 55.21547597308487, 15.009797201422398]
Flavors
- Script tag
- React
- Python/Jupyter notebook
- MapboxOverlay
- GoogleMapsOverlay
- CartoLayer
- ArcGIS
Expected Behavior
The (x, y, z) coordinates should be consistent for the same point on the object, and the z value should be exactly 15 regardless of the camera's position.
Steps to Reproduce
Move the camera to different positions.
Use the unproject method to convert screen coordinates back to world coordinates.
Observe the variation in the (x, y, z) coordinates for the same point on the object.
Environment
- Framework version: deck.gl@8.9.34
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the React flavor on deck.gl@8.9.34, focusing on the pickObject and unproject methods while moving the camera. Trace the coordinate conversion entry points and compare repeated results for a fixed-height object; done means the same point returns consistent coordinates and a z value of 15.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- computer-graphics, data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100