Results 1 to 4 of 4

Thread: 3d moon orbiting the planet

  1. #1
    Guest

    3d moon orbiting the planet

    Hi
    I am writing a small prgram that a palent orbiting the sun and teh moon orbiting the planet. when I run the progrma i press a key to make the planet orbiting. what I need is that as soon as the program is executed the orbiting should start.
    could you help? pelase.
    thanks in advance.
    Timm

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    926

    Re: 3d moon orbiting the planet

    Are you asking how to make the planet and moon orbit or something else?

    I did a fully featured solar system once for a game, with moons and planets, all with (semi) accurate topological data.

    mail me some more specific questions if you like.

    Nutty

  3. #3
    Guest

    Re: 3d moon orbiting the planet

    i think you mean that you wnat it to move without pressing a key??
    you need to remove the for loop from the display function (if you are using one). make any variables global not local in the display function.
    then put glIdleFunc(Display);
    in the main function. this should work.
    if not then you will have to show a copy of you code.

    -kebabinho

  4. #4
    Member Contributor
    Join Date
    Nov 2000
    Location
    Thuringia, Germany
    Posts
    85

    Re: 3d moon orbiting the planet

    I think you mean glutIdleFunc(display);
    use this, if you use GLUT. if you are coding direct with mfc, you have to overload the OnIdle() func with a display(); call.

    bastian.

Similar Threads

  1. orbiting
    By morello in forum OpenGL: General
    Replies: 4
    Last Post: 11-26-2010, 05:22 PM
  2. Moon Buggy nodes without children
    By rsmeenk in forum COLLADA
    Replies: 1
    Last Post: 11-16-2008, 06:42 PM
  3. Orbiting Camera
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-12-2004, 05:34 AM
  4. Lamp, or sun, or moon, or spot light: How to draw?
    By IAstudent in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 04-06-2004, 06:07 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