V
V
Vadim)))2021-08-02 15:38:37
Python
Vadim))), 2021-08-02 15:38:37

Why doesn't Light() work in python ursina engine?

I am studying the Ursina library. Wrote the code to create a cube:

from ursina import *

app = Ursina()
window.color = color.black

Light(type='ambient', color=(0.5, 0.5, 0.5, 1))
Light(type='directional', color=(0.5, 0.5, 0.5, 1), direction=(1, 1, 1))

cube = Entity(model='cube', rotation=(-15, 0, 0), position=(0, 0, 0), scale=4, color=color.orange)

app.run()


the cube is not illuminated, I took someone else's code for lighting, the same thing. Rather, it's the Ursina library. I must say right away that pip was an old version at the time the library was installed. Python downloaded recently. updated pip, didn't help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Magan4ik, 2021-10-10
@VadimCoder

AmbientLight(color=(0.5, 0.5, 0.5, 1))
DirectionalLight(color=(0.5, 0.5, 0.5, 1), direction=(1, 1, 1))

try like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question