Planet Orbit In Python Easy #coding #python

preview_player
Показать описание
#shorts
Рекомендации по теме
Комментарии
Автор

The code- (planets may appear wobbly)
from ursina import *
from ursina.shaders import *

app = Ursina()

EditorCamera()

Entity.default_shader = basic_lighting_shader

n = Entity(model="sphere", color = color.yellow)

o1 = Entity(size = (2, 1, 1))
o2 = Entity(size = (2, 1, 1))

e = Entity(model="sphere", scale = 0.2, color = color.red)
e2 = Entity(model="sphere", scale = 0.2, color = color.blue)

def update():
e.position = (o1.forward*60*time.dt)
e2.position = (o2.forward*100*time.dt)
o1.rotation_y += 2
o2.rotation_y += 1

app.run()

programmingduntless
visit shbcf.ru