3D Finding Camera to World Matrix

F

Freddie The Potato

Guest
Heya!

I've been struggling trying to create a function that converts 2d screen coordinates into a 3d raycast. I think I've found a good way to do it, but it involves transforming a directional vector from camera-space to world-space.

I understand that in order to convert world-space coordinates to camera-space coordinates you can multiply a point by the camera's view matrix with matrix_transform_vertex(view, x, y, z).

But how do you go from camera-space to world-space? Would you instead multiply the point by the inverse of the view matrix? From my understanding matrix inversion is a very complicated topic and Gamemaker does not have any matrix_inverse functions.

Or is there another way to transform from camera-space to world-space?
Any tips would be greatly appreciated.
 
Top