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\Class开发者_开发技巧es\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?
I found it! The line above my FocalPoint line involved setting Agent.Focus
; so I traced the line of UTBot -> UDKBot -> AIController -> Controller
and finally the Controller class has a Focus member:
var BasedPosition FocalPosition; // position controlled pawn is looking at
var Actor Focus; // actor being looked at
So, FocalPoint
was renamed to FocalPosition
.
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 member Position
, so I will assume that's the correct variable to assign to.
I changed my line of code from
Agent.FocalPoint = ObjectOfAttention.Location;
to
Agent.FocalPosition.Position = ObjectOfAttention.Location;
I haven't tested it (still working on other compiler errors) but it compiles fine now. Hopefully this is the correct solution.
精彩评论