Hello forum!
Hello forum!
Quick overview of my problem: All my assets are 2d, because the game is only viewed from the isometric-perspective.
But the game shall include height, which also requires that every isometric-tile exists with height, width and depth. Nonetheless, since the actual visible game is isometric, I'm struggling a bit with realising the 3d-part. All bounding boxes are meant to be cubes.
Currently I worked out the following plan:
- Do the 3d math in a orthogonal view (but in 3d).
- If an object moves, work with its physics-coordinates and check for collision etc.
- If a movement has been committed, transform the top-down 3d view to a 2d isometric view (use physics-coordinates to calculate the location for the 2d texture plane of the tile).
I'm still wondering whether this is a good way to do it or if there is anything that should be preferred? I personally assumed, that is way easier to work from top-down, because cube-collision should be easier and faster to implement, if everything is just straight.
Another question would be, what transformation-matrix should be used for this case?
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?
Thanks for taking your time to read my post!
Edit: I assume this posts fits better in Math and Physics... sorry!