evaera / matter

A modern ECS library for Roblox.
https://eryn.io/matter/
MIT License
144 stars 34 forks source link

use ViewportPointToRay in mouse highlight implementation #74

Closed jackTabsCode closed 8 months ago

jackTabsCode commented 9 months ago

Fixes an oversight I made in #68

jackTabsCode commented 9 months ago

Using ViewportPointToRay https://github.com/evaera/matter/assets/44332148/7fec8b49-0e76-453f-b1b2-11a22408608a

Using ScreenPointToRay (it's translated incorrectly) https://github.com/evaera/matter/assets/44332148/aae4ae5d-cf7c-4b6e-b873-0ae936f3be60

Ukendio commented 8 months ago

Just tested and it seems to have fixed the issue!