How to make 3d model of moon which move around the earth in panda 3d
We make 3d model of moon which move around the earth with help of panda3d .
We write some lines of code in python to make the model of moon .
LETS START CODING
First we have to from direct.showbase.ShowBase import ShowBase
After this we have to make class which inherit from a ShowBase class. After this we have to make constructor .
Now , we have to load the model of earth and moon and the texture of earth. For this we have to write
After load models and texture we have to make moon light . For this we have to write
Now , we have to make three variables
These variables are used in a function which help the moon to move around the earth. For this we have to write a function which move the moon around the earth. So, we have to write
After making class we have to make a object of class and run the program. For this we have to write
HERE ARE THE CODE
OUTPUT