Merge pull request #288 from lmcintyre/master

fix screentoworld
This commit is contained in:
goaaats 2021-04-05 19:12:28 +02:00 committed by GitHub
commit e5331ea1d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -354,9 +354,10 @@ namespace Dalamud.Game.Internal.Gui {
viewProjectionMatrix.Invert();
var localScreenPos = new Vector2(screenPos.X - windowPos.X, screenPos.Y - windowPos.Y);
var screenPos3D = new Vector3 {
X = screenPos.X / width * 2.0f - 1.0f,
Y = -(screenPos.Y / height * 2.0f - 1.0f),
X = localScreenPos.X / width * 2.0f - 1.0f,
Y = -(localScreenPos.Y / height * 2.0f - 1.0f),
Z = 0
};