Results 1 to 2 of 2

Thread: Rotation, translation & lights

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2000

    Rotation, translation & lights

    I have a small program where I can move around with the camera by moving and rotating all the objects in the opposite direction. But it seems that the light source always stays in the same place, so it follows the camera. Since translate and rotate affect objects that are drawn after these actions, how could I get the light source to be positioned with rest of the objects?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000

    Re: Rotation, translation & lights


    Seems like you are setting the lightposition before translation/rotation.

    First you need to translate/rotate camera, then place light, and then render objects.


Similar Threads

  1. rotation after translation
    By nemolionak3 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-16-2018, 03:30 PM
  2. Translation after rotation
    By jalepo in forum OpenGL: General
    Replies: 3
    Last Post: 08-08-2014, 02:04 PM
  3. translation rotation
    By prabhakaran in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 02-18-2008, 11:48 AM
  4. translation instead rotation
    By Maxmagnus in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-10-2002, 11:22 AM
  5. rotation and translation
    By joeyx in forum OpenGL: Basic Coding
    Replies: 14
    Last Post: 04-23-2001, 12:32 PM

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