我正在尝试使用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()行中。这是怎么引起错误的,我该怎么解决?
我曾尝试打印其位置(这似乎是问题所在,但当它在init以外的任何地方放置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。