I follow the MieszkoZ’s tutorial (http://unreal-ai-tutorial.info/) to make my AI jump on my game, and it works well when i start a new instance from the Visual Studio, but When I got the editor opened and use hot reload, my IA isn’t working. But the code is exactly the same.
I add some debugs and breakpoints and found that the problem is at the “FNavAreaHelper::HasJumpFlag(SegmentStart)” which is not returning true after the hot reload, but nothing has change on the scene or on the code.
I use the ue 4.6.1 compiled version from git.
Here is the code:
void UMinionPathFollowingComponent::SetMoveSegment(int32 SegmentStartIndex)
{
Super::SetMoveSegment(SegmentStartIndex);
if (CharacterMoveComp != NULL)
{
const FNavPathPoint& SegmentStart = Path->GetPathPoints()[MoveSegmentStartIndex];
const FNavPathPoint& SegmentEnd = Path->GetPathPoints()[MoveSegmentEndIndex];
if (FNavAreaHelper::HasJumpFlag(SegmentStart))
{
if (SegmentStart.Location.Z < SegmentEnd.Location.Z)
CharacterMoveComp->GetCharacterOwner()->Jump();
}
else
{
CharacterMoveComp->SetMovementMode(MOVE_Walking);
}
}
}
Is this a bug? or I’m missing something?