SFML community forums

Help => Graphics => Topic started by: Caterpillar on September 20, 2016, 07:15:07 pm

Title: Rotate View on BOTH Axes
Post by: Caterpillar on September 20, 2016, 07:15:07 pm
Hi, new here.

Just wondering is it possible to make an Isometric game with this. I noticed in the View class that we can rotate the camera, but just along one axis.

I need to rotate the camera 45 degrees horizontally and 30 degrees downwards vertically.

Any help or a point in the right direction would be appreciated!
Title: Re: Rotate View on BOTH Axes
Post by: Caterpillar on September 20, 2016, 07:50:45 pm
I guess I'll have to code that in somehow myself?

Will keep practicing with pure 2D cartesian for now. Still any answers would still be appreciated
Title: Re: Rotate View on BOTH Axes
Post by: Hapax on September 22, 2016, 03:50:17 pm
You could use the view to rotate 45° and then "squash" it to be shaped how you prefer. Squashing this, though, might require more work; you could render the rotated view to a render texture and then draw that render texture to the window with a different scale (or a stretched view).

That said, I'm pretty sure it'd be easier (and is more common) to just draw the "diamond"-shaped (rhomboid) tiles directly. "Collision" with rhombi/diamonds is explained in many articles within the internet. You can search for "collision with isometric tiles" or similar :)