UDK“错误,无法识别的成员“FocalPoint”在课堂上……”
我正在将 UT3 游戏移植到 UDK。
它使用大型代码库,我收到此编译器错误:
C:\UDK\UDK-2010-03\Development\Src\FixIt\Classes\ZController_FireWeapon.uc(129):错误,“ZController”类中无法识别成员“FocalPoint”
ZController 扩展 UTBot 中无法识别的成员“FocalPoint”。这是引用的行:
Agent.FocalPoint = ObjectOfAttention.Location;
(Agent 的类型为 ZController)
FocalPoint 发生了什么?
I'm porting a UT3 game to UDK.
It uses a large code library and I'm getting this compiler error:
C:\UDK\UDK-2010-03\Development\Src\FixIt\Classes\ZController_FireWeapon.uc(129) : Error, Unrecognized member 'FocalPoint' in class 'ZController'
ZController extends UTBot. This is the referenced line:
Agent.FocalPoint = ObjectOfAttention.Location;
(Agent is of type ZController)
What happened to FocalPoint?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了!我的 FocalPoint 行上方的行涉及设置
Agent.Focus
;所以我追踪了 UTBot -> 的行UDKBot-> AI控制器-> Controller,最后,Controller 类有一个 Focus 成员:因此,
FocalPoint
被重命名为FocalPosition
。事情还没有结束!显然 FocalPoint 曾经是一个向量,现在 FocalPosition 是一个 BasedPosition。所以我的代码仍然不起作用,因为它试图将向量分配给 BasedPosition;编译器抱怨
错误,'='中的类型不匹配
。 BasedPosition 是 Actor 中的一个结构体,并且有一个向量成员Position
,因此我假设这是要分配给的正确变量。我将代码行从 更改
为
我尚未测试它(仍在处理其他编译器错误),但现在可以正常编译。希望这是正确的解决方案。
I found it! The line above my FocalPoint line involved setting
Agent.Focus
; so I traced the line ofUTBot -> UDKBot -> AIController -> Controller
and finally the Controller class has a Focus member:So,
FocalPoint
was renamed toFocalPosition
.It's not over yet! Apparently FocalPoint used to be a vector and now FocalPosition is a BasedPosition. So my code still didn't work because it was trying to assign a vector to a BasedPosition; the compiler complained with
Error, Type mismatch in '='
. BasedPosition is a struct in Actor and has a vector memberPosition
, so I will assume that's the correct variable to assign to.I changed my line of code from
to
I haven't tested it (still working on other compiler errors) but it compiles fine now. Hopefully this is the correct solution.