This repository has been archived by the owner on Apr 18, 2022. It is now read-only.
[BUG] world_to_screen returns incorrect result #2057
Labels
diff: easy
Achievable by a single junior developer with a bit of guidance.
good first issue
This is a good issue to start with if you are new and want to contribute to Amethyst.
pri: important
Something other teams are relying on, or a low-level, critical piece of functionality.
team: engine
type: bug
Something is not working as it should.
Description
Hi, I have found that with a perspective camera and a non-trivial transform, the function
world_to_screen
returns an incorrect result.Cause of the issue
It seems to me that the following line in
world_to_screen
should really say
so that it is the inverse of the matrix
*camera_transform.global_matrix() * self.as_inverse_matrix()
used inscreen_ray
.Reproduction Steps
None provided.
What You Expected to Happen
I expect that
world_to_screen
performs the inverse operation ofscreen_ray
.What Actually Happened
The function
world_to_screen
does not perform the inverse operation ofscreen_ray
.Screenshots and Logs
None provided.
Your Environment
Additional Context
I hope this issue is clear from the described cause of this issue. If you would like me to provide a test case, please let me know!
The text was updated successfully, but these errors were encountered: