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 to detect transparency or colour on a mask?

I'm making a top-down 2D map and figured it'd be much faster to paint a collision mask to determine where the player can and can't go. I could then trace from the cam to the mask to determine whether the area was walk-able or not. However I can't work out how to find the opaque/transparent parts of a material. I could cut around in a 3D modelling program but that would take much longer and would need to be re-modeled after every change.

If not by alpha, is there a way to get the colour of a material from a location or line trace? Or another solution I haven't thought of?

Product Version: UE 4.18
Tags:
more ▼

asked May 18 '18 at 09:38 AM in Blueprint Scripting

avatar image

Kibblesticks
151 3 12 19

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

1 answer: sort voted first
more ▼

answered May 18 '18 at 11:50 AM

avatar image

redbox
4.2k 80 17 103

avatar image Kibblesticks May 20 '18 at 03:50 PM

Thanks Redbox, reading the render target definitely seems worth investigating, thanks for sharing!

(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