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 can I make two specific colliders cause an overlap event.

Hey all,

I've been trying to wrack my brain into how I can make it so when one collider starts to overlaps another specific collider, to turn on dynamic lights and when it stops overlapping, it turns the dynamic lights off.

I'm trying to achieve this so I can have full dynamic lights on in my level but want to optimize it so that the shadows are only enabled when the camera is looking in there direction. I have a cone attached to my camera, spheres around the lights and tried to make it so when they overlap it does it but I'm clearly missing something.


Product Version: UE 4.8
more ▼

asked Aug 15 '15 at 08:39 PM in Blueprint Scripting

avatar image

80 10 21 25

avatar image mindfane Aug 16 '15 at 03:50 AM

Can you specify what exactly is the problem you are facing? With Overlap events? or Toggling the lights?

avatar image CactusFantastico Aug 16 '15 at 09:02 AM

Overlap events i would say more, i tried to make it just print a string when it overlapped but that never worked so i knew i was doing something wrong.

avatar image ambhar Aug 16 '15 at 01:01 PM

You need to create an object for your light blueprint and pass it as object while casting. To turn on/off light , you can change intensity or brightness of light

avatar image CactusFantastico Aug 16 '15 at 01:04 PM

Hmm I'm sorry, I'm not sure I'm following you haha I've got the light stuff down at least, I'm just not sure how to make it cast to the light blueprint.

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

1 answer: sort voted first

You can try adding a trigger box or box collision around other collider,and on its overlap perform the function. I too faced this problem where my character was walking on certain floor tile but overlap event was not getting fired. So I used trigger box in that case.

more ▼

answered Aug 16 '15 at 11:32 AM

avatar image

821 22 75 61

avatar image ambhar Aug 16 '15 at 10:05 AM

In both your Colliders, make sure you have checked "Generate Overlap Events" in their details panel.

avatar image CactusFantastico Aug 16 '15 at 11:23 AM

Yeah they are indeed both set. I think my problem might be making them both communicate with each other.

avatar image CactusFantastico Aug 16 '15 at 12:10 PM

Right well trigger box is working a lot better then what i was using before haha now i can indeed get it to print strings if i am looking at or away from the trigger box.

alt text

Main thing now is to make it so it can reference the light blueprint I have so it can turn on and off the dynamic shadows. Since this is a top down game, I will prob need a different blueprint for each room to make sure only the rooms that are not being looked at turn off there shadows.

avatar image ambhar Aug 16 '15 at 12:28 PM

You can cast to your Light BP and get its reference to turn on and off the light. Also please accept the answer, if you think it helped.

avatar image CactusFantastico Aug 16 '15 at 12:33 PM

hmm i set it to cast to the BP and it's not working. Also I can't seem to find a node to effect dynamic shadows on or off, do you know which I should use?

alt text

avatar image CactusFantastico Aug 16 '15 at 12:55 PM

Actually never mind, i found that changing cast shadows works but I had dynamic lighting set to off so it couldn't ever switch it on through blueprints. It seems to be working now but only if I try and make reference on of the blueprints in the level. Is there a way to make it globally on all BP of that type?

alt text

avatar image mindfane Aug 16 '15 at 01:08 PM

Perhaps create a new BP extended from Actor. Add a Light component and a trigger volume in it. Then you implement the light toggle logic in it by overriding the OnBeginOverlap and OnEndOverlap events. Then you can place many instances of this BP and they will all behave the same way,

avatar image ambhar Aug 16 '15 at 01:16 PM

Yes. Make a Blueprint with all these elements in it (light , trigger box) and add On Overlap event within this Blueprint to perform the functionality. Then you can add this BP anywhere in your level just by dragging it to the target location and same functionality will be performed.

avatar image CactusFantastico Aug 16 '15 at 01:23 PM

Yep you guys are completely right haha works perfectly! thank you guys so much :D

(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