Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Character
Summary
NavigateTo does not reach objetive if ReachRadius is bigger that >5.0
Steps to Reproduce
Using the following code, the character get stucks after trying to make the navigation
if (NewTarget := BehaviorHelp.FindNearestTargetFromPos[NPCCharacter], TargetAgent := NewTarget.GetAgent[], TargetCharacter := player[TargetAgent].GetFortCharacter[]):
spawn{NPCFocus.MaintainFocus(TargetAgent)}
TargetPosition := TargetCharacter.GetTransform().Translation
NavTarget := MakeNavigationTarget(vector3{X:=TargetPosition.X,Y:=TargetPosition.Y,Z:=TargetPosition.Z})
NavResultGoTo:=NPCNavigatable.NavigateTo(NavTarget, ?MovementType := movement_types.Running, ?ReachRadius := NPCRange)
NPCAnim.Play(Attack1,?BlendInTime:=0.25,?BlendOutTime:=0.25)
Sleep(1.0) #Time that least to attack
DistanceDifference := Distance(NPCCharacter.GetTransform().Translation, NewTarget.GetTransform().Translation)
Print("DistanceDifference: DistanceDifference")
if (DistanceDifference <= (NPCRange+10.0)):
BehaviorHelp.ProjectileLife(NPCCharacter.GetTransform(),TargetCharacter)
NewTarget.Damage(NPCDamage)
Print("Attacking")
Expected Result
Character reaches objetive and attacks
Observed Result
Character does not move
Platform(s)
windows
Island Code
Not yet
Additional Notes
Check video and code