Hello there. I am trying to get the pick position in terms of a vector3 from the projection and view matrix. I am using my own math classes. I don’t think this is right, could you give any suggestions on how to fix this?
private Vec3 getPick(Mat4 projection, Mat4 view) {
Mat4 inverseProject = projection.copy().inverse();
Mat4 pick = inverseProject.mul(view.copy());
Vec3 pos = new Vec3(pick.m10, pick.m11, pick.m12);
return pos;
}
Cheers.