我打开搅拌器取默认的立方体。将其保存在目录中,名称为cube1.blend。使用命令行工具blend2bam并将其放入同一目录中的cube1.bam。Ursina实体似乎可以识别它,但不会渲染,或者至少我找不到它,并且不在同一位置,就像我只是渲染打包的模型立方体一样。
from ursina import *
app = Ursina()
entity = Entity(model='cube1')
# So I can look for cube
EditorCamera()
app.run()
*注意使用ursina或panda3d打包的默认模型或实体模型
因此,我开始使用python的API,名为Ursina Engine,我需要添加一个纹理。无论我为文件路径设置什么,总是不会渲染。没有错误,只是一个空白的实体。
from ursina import * # import everything we need with one line.
#an entity is basically anything you can see or hear/interact on a screen
def update():#updtes every frame
if held_keys['a']:
test
我正在创建一个使用Ursina的小游戏,我有代码,它使用perlin噪声生成一个地形网格。网格本身呈现,但我不能适当地将纹理和着色不工作,它只是呈现为一个坚实的颜色。
这是我的密码
`
from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController
from ursina.shaders import lit_with_shadows_shader
from perlin_noise import PerlinNoise
import time
game = Ursi
我一直在用ursina制作一款python 3d游戏。到目前为止还不错,但有一个错误: File "C:\Users\my name\AppData\Local\Programs\Python\Python39\lib\site-packages\ursina\main.py", line 117, in _update
__main__.update()
File "c:\Users\my name\Desktop\game456.py", line 14, in update
release()
NameError: name