Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Help using free transform matrix
- - By arrow Date 2014-09-11 16:50
I want to draw the surface of a top down game using gosu's transform function like this:



However I can't figure out how to construct and use a transformation matrix and how to convert between onscreen positions and on surface positions.
Parent - - By jlnr (dev) Date 2014-09-12 00:43
You will probably have to concatenate (multiply) two matrices - one to rotate the image by 90° to make it 'fall on the ground', and another to implement a perspective transform based on Z coordinates. I am sure you can find information about both types of matrices in any book on 3D programming - there are only a handful of common matrix types, anyway. :)
Parent - By arrow Date 2014-09-12 14:05
Thanks I should be able to figure that out.
Parent - By RavensKrag Date 2014-09-29 15:53
The general problem of conversion between screen coordinate-space positions and surface coordinate-space positions is called 'mouse picking'

Hopefully that helps you out some.
Up Topic Gosu / Gosu Exchange / Help using free transform matrix

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill