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"

Can actor react to light?

I want to know if it's possible to make an actor react to the lighting, meaning if light shines on my actor, it will activate a pointlight inside my actor or something of that nature. If anyone knows if it can be done within blueprints, I would like to know.

Product Version: UE 4.9
more ▼

asked Nov 05 '15 at 11:28 AM in Using UE4

avatar image

1 1

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

1 answer: sort voted first

You can do this with line tracing, I done something that will suit you, but I can't endup with one linetrace because if I check "ignore self" linetrace not overlap with objects on level but only with player, you can fix this if add another linetrace for all objects except of player. alt text

You need to create blueprint that you want to represent you light (add light as component, I call this blueprint BP_LightTrace) and place somewhere, then create 2 var in you character blueprint - LightTraceArr array of type BP_LightTrace ( bp that represent you light ) and LightTraceFArr array of type float, then see my node setup. LightTrace event just plugged to EventTick. This very basic setup, instead of printing min float that represents closest BP with point light you can drive material collection parameter in you custom dynamic shader, for example you can drive color modulation of you shader as you mention before. There a lot of tuts how you can do it.

lighttrace.jpg (880.7 kB)
more ▼

answered Nov 05 '15 at 04:10 PM

avatar image

91 2 3 2

avatar image galohard Nov 05 '15 at 04:21 PM

Whoa! I missed! Need swap trace start and trace end. alt text

(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