Closed OnderCoskun16 closed 7 months ago
What version of GLControl and OpenTK are you using?
PackageReference Include="OpenTK" Version="4.8.1" I tried your example that called name OpenTK.WinForms.InputTest
is there anyone can help the my question?
Sorry for the late reply.
Not sure where you got example code that contains Vector4.Transform
but you are likely looking for Vector4.TransformRow
.
If there is any resource where we are using Vector4.Transform
it would be great if you could tell me where so I can fix that.
Please find real examples instead of ones hallucinated by chat gpt. You could ask for support on our discord.
In the code you posted there it seems like the matrix multiplication order is wrong. OpenTK uses row-major matrix conventions where the matrix multiplication order is left to right i.e. vec * matrix
instead of matrix * vec
.
Not sure I understand your question though.
Hello I want to take from screen to world coordinate and i have found follow example
Vector4 clipCoordinates = new Vector4(normalizedX, normalizedY, -1.0f, 1.0f); Matrix4 invProjection = Matrix4.Invert(projection); Vector4 eyeCoordinates = Vector4.Transform(clipCoordinates, invProjection); this line has error due to Argument 2: cannot convert from 'OpenTK.Mathematics.Matrix4' to 'OpenTK.Mathematics.Quaternion'
Your library is public static Vector4 Transform(Vector4 vec, Quaternion quat) but all of examples has public static Vector4 Transform(Vector4 vec, Vector4 invprojection)
how can i find a solution this problem? Thank you for interesting