`Camera::world_to_viewport` returns coordinates relative to render target instead of viewport
Open
A-Rendering
C-Bug
S-Needs-Design
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version and features
Bevy 0.16
## What you did
I was using `Camera::world_to_viewport` for a camera that has a non-zero viewport position.
## What went wrong
The results I were getting had `target_rect.min` (viewport position) added to them. It's confusing as the method name suggests that it converts world position to viewport position (as opposed to screen or other render target).
Contributor guide
Assessment
This issue has not been assessed yet.