x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Does the Get Random Point in Radius node really work?

Can anyone confirm that this node actually works? I connect the origin vector and the radius float, doesn't seem to work for me. Really lost here since the documentation doesn't really help much. Thanks in advance.

Product Version: Not Selected
Tags:
more ▼

asked Jun 25 '14 at 08:38 PM in Blueprint Scripting

avatar image

Origami
31 2 3 10

avatar image Origami Jun 27 '14 at 02:42 PM

Can someone else help please? Nothing is working, and there is really nowhere to look for help on the internet.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

After searching the internet I actually found exactly what I needed, here: http://www.mathworks.co.uk/matlabcentral/answers/72915-creating-random-points-in-a-circle . I suppose the RandomPointInRadius node actually has more to do with pathfinding and stuff, rather than what it actually sounds like. So far I can only "suppose" because of the lack of info I can get about nodes in the documentation.

In the link I've found, there's this formula: t = 2*pi*rand(n,1); r = R*sqrt(rand(n,1)); x = x0 + r.*cos(t); y = y0 + r.*sin(t);

With this formula blueprinted, there is a uniform amount of points spawned inside the circle, and everything works just as I needed. Thanks elindell and Shoiko for trying to help, too!

more ▼

answered Jun 27 '14 at 06:07 PM

avatar image

Origami
31 2 3 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Can you post your BP? I'm using it several places and it seems to work well.

more ▼

answered Jun 25 '14 at 10:03 PM

avatar image

Shoiko
638 57 55 67

avatar image Origami Jun 26 '14 at 08:53 AM

alt text This is how I am connecting it, and doesn't seem to work. Prints out 0's on all axes.

question2.jpg (40.9 kB)
avatar image Shoiko Jun 26 '14 at 10:12 AM

Try this. I had to use this to get results.

alt text

avatar image Origami Jun 26 '14 at 10:33 AM

alt text

I am still having problems, it's just printing out 0's again. :/

question3.jpg (45.0 kB)
avatar image Origami Jun 26 '14 at 10:51 AM

Could you please replicate it the way I did it on your end?

avatar image Shoiko Jun 27 '14 at 06:43 PM

From what object are you using this is it a character controller BP?

avatar image Origami Jun 28 '14 at 10:36 AM

No, it's a simple blueprint. All I needed was getting a random location around one of the actor's in the scene. For example, I have a tower in my scene, and I choose a random vector in the world around the tower at a given radius, and I can then do stuff with that vector, like shoot there, or spawn a trooper there, you know.

avatar image elgordostudio Jun 27 '14 at 03:34 PM

I tried your way Origami and got 0,0,0 results too. I don't know what the purpose of get random point in radius is exactly, its listed under navigation so I'm thinking it needs the navpath data to do its work.

Couldn't you simply use a random unit vector node and multiply it by a random float between 1 - 1000? like this alt text

avatar image Origami Jun 27 '14 at 06:01 PM

Thank you, this works just as I needed(if zero-ing out the Z, so it's 2D), but what it does is it spawns excess of points in the middle, and then the border area lacks a lot. I've actually found just what I needed somewhere else on the internet, which I posted as an answer.

avatar image elgordostudio Jun 27 '14 at 08:08 PM

yeah you are correct, it's definitely clumping in the middle in my example, I didn't think if fully through, thanks for sharing your link :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question