Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Help me to find the right angle

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    Santiago, Cuba
    Posts
    13

    Help me to find the right angle

    Im trying to simulate an isometric tile engine with open gl. I can correctly rotate the tiles and the viewpoint up and down, but I dont know how to fix the angle of the tile plane, see the image here:
    At beginning, i translate the image using this code:
    glTranslatef(xd, yd, zd);
    glRotatef(yrot,0.0f,1.0f,0.0f);
    glRotatef(xrot,1.0f,0.0f,0.0f);

    yrot starting value: -40.0
    xrot starting value: -80.0
    xd= -10.0, yd= -5.0,zd= -18.0

    Any suggestion?
    programming | games | linux >> my_blog

  2. #2
    Junior Member Regular Contributor
    Join Date
    Jan 2003
    Posts
    146

    Re: Help me to find the right angle

    If you're doing it in 3D, you probably need a projection matrix that gives you
    an isometric view. Or if you're doing it in 2D, then you need to use an othographic
    projection and draw them isometrically.

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    Santiago, Cuba
    Posts
    13

    Re: Help me to find the right angle

    Originally posted by gator:
    If you're doing it in 3D, you probably need a projection matrix that gives you
    an isometric view. Or if you're doing it in 2D, then you need to use an othographic
    projection and draw them isometrically.

    Well, I dont really know how Im doing it
    programming | games | linux >> my_blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •