我刚刚开始学习blender及其脚本,并尝试运行其示例代码
import bge
def main():
cont = bge.logic.getCurrentController()
own = cont.owner
sens = cont.sensors['mySensor']
actu = cont.actuators['myActuator']
if sens.positive:
cont.activate(actu)
else:
cont.deactivate(actu)
main()
Run Code Online (Sandbox Code Playgroud)
并得到以下错误:ImportError:没有名为'bge'的模块我搜索了一个解决方案,但找不到any.how来解决这个问题?我正在使用搅拌机2.65
| 归档时间: |
|
| 查看次数: |
4429 次 |
| 最近记录: |