Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Rotate View on BOTH Axes  (Read 1341 times)

0 Members and 1 Guest are viewing this topic.

Caterpillar

  • Newbie
  • *
  • Posts: 2
    • View Profile
Rotate View on BOTH Axes
« 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!

Caterpillar

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Rotate View on BOTH Axes
« Reply #1 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

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Rotate View on BOTH Axes
« Reply #2 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 :)
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything