from ursina import *
# update sphere_2 rotation
def update():
line.rotation_y += 1
sphere_2.rotation_y += 1
app = Ursina()
sphere_1 = Entity(model = 'sphere',scale = 2)
# try to make sphere_2 follow the lines rotation
line = Entity(model = 'line',scale = 4,y = -1)
sphere_2 = Entity(model = 'sphere',scale = 1,x = -2)
app.run()
how do I make a sphere rotate around another sphere in ursina, python
301 Views Asked by Radioactive Gaming At
1
Parent sphere_2 to sphere_1.
sphere_2.parent = sphere_1
to make position, rotation and scale relative to sphere_2. Orsphere_2.world_parent = sphere_1
, if you want to keep the original transformation intact after parenting it.