Jump to content
  • Advertisement
Sign in to follow this  
Androphin

Isometric view with 2 grids & tile size

Recommended Posts

 Cube.png.763bf2c71e0862fc396fb4e8e1f456e9.png

Please use the above image in your game, so I can see if everything is setup correctly.

1 hour ago, Androphin said:

I needed a rotation-matrix for the isometric perspective

There seems to be a confusion. A Orthographic camera, produces a Isometric image when it is lined up at a 45 degree angle.

All Isometric images are Orthographic,however not all Orthographic images are Isometric. Like all thumbs are fingers but no all fingers are thumbs.

 

https://en.wikipedia.org/wiki/Isometric_projection

Edited by Scouting Ninja

Share this post


Link to post
Share on other sites
Advertisement
2 hours ago, Androphin said:

Due to the direction and position of the cam, I needed a rotation-matrix for the isometric perspective. (As described in my 3rd post)

Reading this again. Do you mean, you don't know how to make the image "look" at the camera? You could use a "look" formula, however because isometric is done from 45 degree angles; you can just rotate sprites by 45 degrees.

Share this post


Link to post
Share on other sites
2 hours ago, Scouting Ninja said:

Reading this again. Do you mean, you don't know how to make the image "look" at the camera? You could use a "look" formula, however because isometric is done from 45 degree angles; you can just rotate sprites by 45 degrees.

Exactly, the image "planes" are not parallel to the projectionmatrix/viewport of the camera, because the camera is looking down to the origin in a 45 degree angle and the sprites get drawed on y/x.
This image shows how the sprites are drawn. The rotation matrix rotates the sprites 45 degree around the y-axis.
scewed.png.9fea5732f9fee21db16dcfe81ef286ad.png

In your image
IsoImage.jpg
the one in the middle shows how I want it.
My sprites are perpendicular to the isometric grid. That's why they look scewed.

Edited by Androphin

Share this post


Link to post
Share on other sites

I see libgdx allows you to define a matrix from the start for your sprites, using Batch() https://libgdx.badlogicgames.com/ci/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/Batch.html#begin--

So if you use Batch.begin(); just as is, it will look at the camera. So if you wanted a HUD it would be: hudBatch.begin(); So don't assign any matrix to the batch of sprites.

 

It's nice to know that libgdx uses batches from the start.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!