79390797

Date: 2025-01-27 12:39:49
Score: 0.5
Natty:
Report link

Are you confused by the black color of the face on the right cube? Your light source is a directional projector (lamp). You illuminated one straight face on the red cube, but the light does not reach the green cube and the cube is black. Check:

from ursina import *
app = Ursina()
light = AmbientLight()  
light.rotation = Vec3(0, 0, 0)  # Setup light
e = Entity(model=Cube(), x=-2, color=color.green)
e = Entity(model='cube', x=2, color=color.red)
app.run()

you don't need to flip the normals, you need to set the light

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Владимир Атаманив