This is wrong for a few reasons.
(Edit: Removed, this was a mistake on my side, there is such property of course. I was thinking of AutoAnimation.) There’s no property–AvatarHierarchy
in TCastleThirdPersonNavigation (which is the type ofThirdPersonNavigation
field).- You didn’t initialize the field
ThirdPersonNavigation
. It would crash. - And it doesn’t make sense to have field
ThirdPersonNavigation
inside classTMyThirdPersonNavigation
, when theTMyThirdPersonNavigation
has already the features you want (as it descends fromTCastleThirdPersonNavigation
). - You also nowhere initialize any instance of
TMyThirdPersonNavigation
, nor do you useAssignAvatar
.
I will repeat what I said in this thread a few times:
Please do not try to solve this task by writing code by “trial and error” (without understanding).
And this is what you effectively try to do, looking at 240 posts in this thread as of now. You make very basic mistakes, and you cannot solve the simplest compilation error. You have a number of misconceptions how the Pascal works. That’s all OK, we all learn, so…
Please take a step back. Learn Pascal, follow the resources we have pointed out, from More Resources to Learn Pascal | Castle Game Engine . Write a few simple applications, create your own simple classes, use them. Then come back to this problem.