HunsingerUK Posted November 28, 2014 Share Posted November 28, 2014 I'm trying to build a solar system model and I've got it working for the sun and the 8 planets. But when I try to add in the earth's moon to have it orbit around the earth, I'm having problems. I simply don't know how to make it dynamically orbit around an object that is itself orbiting around what I assume is a 0 x, 0 y, and 0z position. any help would be greatly appreciated. best, James Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 28, 2014 Share Posted November 28, 2014 just use parent.moon.parent = earth; //the moon is attached to the earthearth.parent = sun; //the earth is attached to the sunand the game loop, you made the moon rotate around the earth and the earth around the sun. Quote Link to comment Share on other sites More sharing options...
HunsingerUK Posted November 30, 2014 Author Share Posted November 30, 2014 that works. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.