playcanvas / playcanvas/engine
Camera.screenToWorld issue with non-uniform scale (self or ancestors).
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
Description
Camera.screenToWold returns wrong results when camera entity or any of ancestors are scaled non-unoformly, for exampe (1.0, 0.8, 0.5).
Example project with issue: https://playcanvas.com/editor/scene/1084507
Steps to Reproduce
- Launch
- Click on surfaces
Point will be in wrong places.
If Camera entity scale is set to uniform value, then issue is gone.
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
Reproduce the issue in the linked PlayCanvas example by launching it and clicking surfaces with a non-uniformly scaled camera or ancestor. Start by locating the Camera.screenToWorld implementation and its coordinate-transform tests, then verify that clicked points map to the correct surfaces under non-uniform scale.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100