混合器python错误

混合器python错误,python,blender-2.49,Python,Blender 2.49,我得到这个错误: 回溯(最近一次呼叫最后一次): 文件“移动”,第1行,在(模块)中 NameError:名称“GameLogic”不正确 明确的 GameLogic是C扩展模块。它将只在游戏引擎中运行,当从python游戏逻辑控制器执行时,有许多示例文件在线显示如何执行此操作。那么您的问题是什么?我得到以下错误:回溯(最近一次调用):文件“移动”,第1行,在(模块)名称错误:名称“GameLogic”未定义 import GameLogic cont = GameLogic.getCurre

我得到这个错误:

回溯(最近一次呼叫最后一次):
文件“移动”,第1行,在(模块)中 NameError:名称“GameLogic”不正确 明确的


GameLogic是C扩展模块。它将只在游戏引擎中运行,当从python游戏逻辑控制器执行时,有许多示例文件在线显示如何执行此操作。

那么您的问题是什么?我得到以下错误:回溯(最近一次调用):文件“移动”,第1行,在(模块)名称错误:名称“GameLogic”未定义
import GameLogic

cont = GameLogic.getCurrentController()

fwd = cont.sensors['forword']
bck = cont.sensors['backword']
lft = cont.sensors['left']
rit = cont .sensors['right']

move = cont.actuators['move']

speed = [0, 0, 0]
rot = [0, 0, 0]


if fwd.positive:

# speed[0] 0 mean the movement will be according tot he x axis 
# speed[1] 1 mean according to the y axis and 2 for z axis

   speed[0] = 0.7

elif bck.positive:
    speed[0] = -0.7


if lft.positive:
    rot[0] = 0.1

elif rit.positive:
    rot[0] = -0.1


move.uselocalDloc = true
move.uselocDrot = false

move.dloc = speed
move.drot = rot

cont.activate(move)