### Re: 3d Physics and 2d Game-objects

Inviato:

**25 ott 2017, 21:32**Is the 3d-physics really needed? Usually for simple isometric games you can do everything in 2d (like a top-down view, internally) and then just render everything converting from top-down to isometric.

From what to what? 3d to isometric?

If you're using everything in 2d, this math can help you: http://clintbellanger.net/articles/isometric_math/

If you're using a 3d engine with a isometric projection matrix, the first things i can think are 1) raycast 2) use MRT and render on another texture an integer that represent each particular object,coordinate or anything you want (e.g. player == 0x99), so that you can just read that value where the mouse is and instantly know which object has been touched.

Or maybe you can run the 2d math also with 3d isometric projection (== simplified raycast)

Another question would be, what transformation-matrix should be used for this case?

From what to what? 3d to isometric?

Last but not least, how would a mouse-click be handled? My idea was to transform the mouse-coordinates from 2d to the 3d field and raycast it for collision?

If you're using everything in 2d, this math can help you: http://clintbellanger.net/articles/isometric_math/

If you're using a 3d engine with a isometric projection matrix, the first things i can think are 1) raycast 2) use MRT and render on another texture an integer that represent each particular object,coordinate or anything you want (e.g. player == 0x99), so that you can just read that value where the mouse is and instantly know which object has been touched.

Or maybe you can run the 2d math also with 3d isometric projection (== simplified raycast)