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"

How do I display a sector of a circle in decal?

Hi, I'm looking for a way to show an area of effect indicator for skills. The three values I have to display the sector are location (origin of the circle), rotation (facing of indicator), and arc (angle of indicator).

I am using Blueprints.

For context, a sector is like a cone but the outer boundary is circular in nature, as opposed to being a straight line.

Reference:

I don't need to detect enemies in the sector because I will probably end up using circle detection and then checking the angle between cast origin and target.

I have considered using a sector material, but I'm not sure how I would change the arc.

I have successfully implemented skill range indicators and full circle area of effect indicators, just having trouble with sectors.

Any suggestions or advice would be appreciated. If this is already a function of Unreal Engine, I apologize, as I'm new and can't find any information about it anywhere. I thought it would be a common topic.

Thanks in advance.

Edit: I technically do not need to use a decal, as long as the desired outcome is achieved.

Product Version: UE 4.18
Tags:
more ▼

asked Dec 08 '17 at 02:39 AM in Blueprint Scripting

avatar image

Jexah
3 1 2 4

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

3 answers: sort voted first

This works, however there are some rough edges, this could be fixed with blur or something else.

alt textalt textalt text

conical.png (615.3 kB)
radial.png (430.6 kB)
help.png (401.7 kB)
more ▼

answered Dec 08 '17 at 05:19 AM

avatar image

Goanna7007
36 3 3

avatar image Jexah Dec 08 '17 at 05:28 AM

Thanks, yeah that's how I ended up implementing it. Again though, the gradient isn't linear 0-255. The angle and 0-1 inputs can't be linearly mapped. Look at the resulting angle difference between param = 0.1 and param = 0. Am I doing something wrong?

avatar image Goanna7007 Dec 08 '17 at 05:53 AM

oh, ok. I just did the same thing mathematically and works well. alt text

help2.png (389.4 kB)
avatar image Goanna7007 Dec 08 '17 at 06:32 AM

Made the input param linear and degrees

alt text

help3.png (436.2 kB)
avatar image Jexah Dec 08 '17 at 06:08 AM

Quick question, what's TexCood?

avatar image Goanna7007 Dec 08 '17 at 06:25 AM

That is the uv coordinate, so the center of the UV has a TexCord of (0.5,0.5)

avatar image Jexah Dec 08 '17 at 06:47 AM

Edit: Sorry didn't see your linear + degrees stuff above. You are doing God's work, the hero that we have, not the hero that we deserve!

All fixed man, you're the best!

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

Use an image like this one, then in the material use an if statement with the white values.

You could use another texture for the circle.

I need to go now but If you need more help comment and I'll help you in a while.

alt text

help2.png (45.6 kB)
more ▼

answered Dec 08 '17 at 03:41 AM

avatar image

Goanna7007
36 3 3

avatar image Jexah Dec 08 '17 at 03:46 AM

Wow, nice creative solution! Conceptually I understand what you mean but I don't know how to implement it. I'll give it a shot and let you know how it goes. If I haven't followed up when you return please assume that I haven't figured it out.

Edit: Got it working! All I need to do now is somehow pass in the threshold.

Edit 2: Got the threshold passed in. Working on angle calculations. Seems like the image you provided isn't linear. Any idea how I could generate a linear version of what you posted?

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

alt text

help3.png (436.2 kB)
more ▼

answered Dec 08 '17 at 04:25 PM

avatar image

Goanna7007
36 3 3

(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