HitResult?

why did you use the HitResult even after deletion

bool bNavigative = UNavigationSystemV1::GetCurrent(GetWorld())->ProjectPointToNavigation(Result.HitResult.Location, Navigation, TeleportationExtent);

Hi Ashok, can you clarify please. I’m not sure what you’re referring to here.
EDIT:
I managed to review this further and I now understand better what I think you’re asking.

The earlier stages of the course uses a line trace to set up the basics of the teleport but now we are changing to use a parabolic curve to perform a teleport. This therefore makes the previous use of a HitResult redundant. Am I correct?

Short answer is a line trace is easy and shows one way of doing it and getting the basic mechanics up and running. This is a great way of prototyping functionality. Most games with teleport mechanics however use a parabolic curve to show the path to teleport. The HitResult is incorporated into the call that returns a whole structure, FPredictProjectilePathResult, which contains the HitResult. This makes the previously declared HitResult obsolete.

It’s common enough to take this sort of iterative process instead of jumping to the correct solution and also enables you to see different approaches and ways of thinking. I happened to like the line-of-sight approach rather than having to flail around with the arms to extend the curve.

I hope this answers the question.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms