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"

"n-gon" of LineTraces around a center point, from camera perspective

I want to create an n-gon shape using only LineTraces. Fire a LineTrace "cone" around a center point (that is also a LineTrace), where each vertex of the "cone" is equidistant to the center point.

I found this example which gets me close, but it's not quite the behavior I want - https://answers.unrealengine.com/questions/435562/spawning-dynamic-objects-along-the-circumference-o.html

The LineTraces orient themselves to the axis they are mapped to; alt text

I need it to orient so it looks like a full circle from the camera's perspective like a projection, every time.

Here's my current Blueprint; alt text

I understand that the steps for this are;

  1. Create a for loop

  2. Create some simple maths where 360/n * Index = angles of each "slice" of the n-gon

  3. ?????

  4. Feed it into LineTraceByChannel using vectors

I don't know what that third step is. How do I get the n-gon to orient to the camera?

Product Version: UE 4.20
ngon01.png (996.6 kB)
ngon02.png (191.4 kB)
more ▼

asked Jul 24 '18 at 11:36 AM in Blueprint Scripting

avatar image

18 2 5

avatar image brokenstyli Jul 25 '18 at 02:02 AM

Figured out a way to get it to orient to the camera, but I ran into a separate issue.

alt text

The closer you aim to the X axis, the less the radius influences the LineTraces. Anyone know why?

ngon03.png (130.6 kB)
avatar image brokenstyli Jul 25 '18 at 06:13 AM

If I aim towards the far + or - X axis (with no vertical movement), it narrows itself.

alt text

ngon04.png (914.9 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

With the help of someone way more knowledgeable than I am, we got a functional oriented version.

Here's the blueprint;

alt text

ngon05.png (180.7 kB)
more ▼

answered Jul 25 '18 at 09:01 AM

avatar image

18 2 5

(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