GML View coords with perspective camera?

Mehdi

Member
I implemented a 2.5D camera using matrices.
However it seems using this type of camera makes properties of ordinary cameras like viewX, viewY,, ... unavailable.
Anyone knows how can I retrieve theses attributes while using viewmat and projmat?
 
Last edited:
Matrix_get and matrix_set can be used for matrices used for the current camera view. If you're needs are more complex than stock gamemaker cameras can provide, you can set them yourself provided you have built them with matrix_build functions. Camera_apply will also apply the matrices for the given camera to the current render.

This video covers how to translate 3d world vertices to 2d gui vertices which might help. I'm sure there is a way to calculate view width and height from a matrix transform, but I don't know it off the top of my head.

Don't know if there's the answer you want here, but I hope I might've pointed you in the right direction.
 

Mehdi

Member
Matrix_get and matrix_set can be used for matrices used for the current camera view. If you're needs are more complex than stock gamemaker cameras can provide, you can set them yourself provided you have built them with matrix_build functions. Camera_apply will also apply the matrices for the given camera to the current render.

This video covers how to translate 3d world vertices to 2d gui vertices which might help. I'm sure there is a way to calculate view width and height from a matrix transform, but I don't know it off the top of my head.

Don't know if there's the answer you want here, but I hope I might've pointed you in the right direction.
Thank you mate, In fact I asked this question in another thread and some nice guys gave me the solution. Thanks again.
 
Top