Announcement

Collapse
No announcement yet.

disable / enable light at certain places

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    disable / enable light at certain places

    Hi,
    I have attached a light bulb to a third person character setup to simulate a torch much needed in some very dark places. Obviously this torch is not needed when the character is outside.

    My question :

    How to switch on and off this light bulb when the character arrives in rooms or goes back outside ?

    Thank you

    #2
    You can set "trigger boxes" inside the rooms that call a toggle event on the Pawn when Pawn overlaps with them.


    Sample: Trigger box set up in a room
    Click image for larger version

Name:	House.png
Views:	113
Size:	572.4 KB
ID:	1730206


    For our trigger box, we set the On Component Begin Overlap and On Component End Overlap to call the Toggle Light event on our Pawn.
    Click image for larger version

Name:	Overlap.png
Views:	95
Size:	96.9 KB
ID:	1730207


    Our Toggle Light event is simply setting the intensity of the light - the functionality may differ depending on how your turning on / off your light. I hope this helps
    Click image for larger version

Name:	ToggleLight.png
Views:	94
Size:	34.4 KB
ID:	1730208
    UE4 Tutorials
    Multiplayer / Replication Series
    Discord Dilemmas Series

    Marketplace Assets
    The Perfect Storm

    Dynamic Radial Menu

    Comment


      #3
      Thanks a lot, I am going to give this a try

      Comment

      Working...
      X