Results 1 to 2 of 2

Thread: Translation relative to rotation

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2010

    Translation relative to rotation

    Is there any way to translate a square (or what have you) from one point to another while ignoring the shape's rotation?

    I've been trying to write a small program to draw a square that rotates on the x-axis, while simultaneously moving away from the user, however when I run the program, it translates relative to the rotation of the shape, basically making a large loop.

    How do I fix this?

  2. #2
    Member Contributor
    Join Date
    Oct 2009

    Re: Translation relative to rotation

    You are calling first glTranslate and then glRotate, aren't you? Solution: Simply swap the order of the calls.
    Antares game blog:

Similar Threads

  1. rotation after translation
    By nemolionak3 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-16-2018, 03:30 PM
  2. Rotation Relative to parent
    By slackdriver in forum OpenGL: General
    Replies: 1
    Last Post: 08-19-2012, 11:55 AM
  3. translation and rotation
    By h333 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-11-2004, 02:03 PM
  4. translation instead rotation
    By Maxmagnus in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-10-2002, 11:22 AM
  5. Rotation & Translation
    By Giotto in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-21-2001, 03:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean