lwjglgamedev / lwjglbook-leg

Source code of the chapters of the book 3D Game Development with LWJGL 3
https://ahbejarano.gitbook.io/lwjglgamedev/
Apache License 2.0
560 stars 202 forks source link

Maybe use Matrix4f.unprojectRay/unprojectInvRay() in chapter 23 #21

Closed httpdigest closed 7 years ago

httpdigest commented 7 years ago

Since version 1.8.0 (released on June 3, 2016) JOML's Matrix4f class can unproject from window coordinates via unprojectRay() and unprojectInvRay(). The MouseBoxSelectionDetector.selectGameItem() can be simplified then.

lwjglgamedev commented 7 years ago

I can mention that in the book, but maybe it's a good idea to see how the process is done.