Get random point at radius always returns same value

Every call to “Get Random Point at Radius” returns same results.

This issue exists since 2014: Does the Get Random Point in Radius node really work? - Programming & Scripting - Epic Developer Community Forums

Steps to reproduce are described in this tutorial: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

I’ve thought this may be somehow related to fact that Get Random Point is called from class that has no reference to NavMesh, so I’ve got it explicitly and checked via breakpoint that loop body gets computed.

Nevertheless, results are same (coordinates are exactly same as return value of Get Actor Location).

45895-123125.png

Here is a temporary partial solution that sometimes chooses positions that character cannot visit. It should be enough for most of use cases of Get Random Point.

Hi polkovnikov,

I followed tutorial and built a project, and Get Random Point in Radius works fine for me. Are you able to reproduce this in a new project as well as you own? What is Acceptable Radius set at in your Behavior Tree’s Move To node?

It’s not a nuisance =)

Get Random Point functions continue to work whether there’s a nav mesh in place or not. I’ll mention that to our AI developer and see whether it would be possible to throw a warning when it doesn’t find one AI can use. Get Random Point from Stream also seems like a good idea, and I’ll talk to him about that as well.

I’m going to go ahead and resolve this post, since Get Random Point in Range seems to be working correctly if Nav Mesh is configured correctly. If we end up entering any bug reports or feature requests, I’ll let you know. Thanks!

I’ve just found out that there was something with navmesh in default Top Down example when I moved several assets to different directories (editor crashed then, report sent): pressing P didn’t show any green areas no matter what were nav mesh bounds. I’ve deleted existing bounds and created them again. It solved problem.

Acceptable radius etc. were set properly according to tutorial.

In case it’s possible that Get Random Point keeps working silently when NavMesh is misconfigured (which seems to be a reason for such behaviour), I think there should be a warning somewhere.

Sorry for nuisance.

P.S. Why there is no “Get Random Point at Radius from Stream” function?

Thank you!

Is there any plans to add “Get Random Point at Radius from Stream” node?

There’s no plan currently, however I’ve entered a feature request specifically for this (UE-24042). I spoke to a dev about it, and was told that due to way random-points-on-navmesh is currently implemented, it won’t be trivial to implement and we can expect this to be backlogged for some time before they can get to it.