为什么 defold rendercam 在 self.data.lpos 中崩溃?

Why is the defold rendercam crashing in self.data.lpos?

我正在尝试使用 rendercam,但它给我这个错误:

错误:脚本:/rendercam/camera.script:147:vmath.vector4 只有字段 x、y、z、w。

堆栈回溯:
[C]: 在函数 '__index'

我查看了代码,发现 self.data 作为 lpos = self.lpos 的容器。 lpos 被分配给 go.get_position()。错误在行 self.data.lpos = go.get_position() 中。这是如何导致错误的?我该如何解决?

我试过打印它的位置(这似乎是问题所在)但是当它把 print("position is ", go.get_position()) 放在除了初始化。

错误:脚本:/rendercam/camera.script:139:vmath.vector4 只有字段 x、y、z、w。 堆栈回溯: [C]: 在函数 '__index' 中 /rendercam/camera.script:139: 在函数 /rendercam/camera.script:137

原来我在尝试将 ob.velocity 设为 vmath.vector3 时不小心将 ob 指定为 vmath.vector3。