Announcement

Collapse
No announcement yet.

Simply blueprint detecting if player is in light.

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

    Simply blueprint detecting if player is in light.

    Hello all.

    Sorry for my bad English and very big pictures.


    I try create small Horror game and i want added simply light stealh system. I try search but not finding any tutorials about this.
    And i create this compact detecting in line trace system.
    It check if player stand in light and nothing prevents the light, it check player head and feet.

    You need 2 variables:

    1: Boolean type - PlayerInRange
    2: Float type - DetectionRange

    Click image for larger version

Name:	Снимок экрана (50).png
Views:	1
Size:	362.2 KB
ID:	1149962

    Click image for larger version

Name:	Снимок экрана (51).png
Views:	1
Size:	338.3 KB
ID:	1149963

    In DetectionRange you put your Light Attenuation radius value.

    Click image for larger version

Name:	Снимок экрана (53).png
Views:	1
Size:	238.5 KB
ID:	1149964

    I hope it's help somebody

    Please, write me if you know how create this better or another post or video about this.

    Thanx for read my post.

    And again sorry for my verybad English.

    Good Luck
    My creations:
    1: Tracking system "Player is in Light?

    #2
    Some images how it works.

    Click image for larger version

Name:	Снимок экрана (62).png
Views:	1
Size:	279.5 KB
ID:	1076460

    Click image for larger version

Name:	Снимок экрана (63).png
Views:	1
Size:	308.7 KB
ID:	1076461

    Click image for larger version

Name:	Снимок экрана (64).png
Views:	1
Size:	310.3 KB
ID:	1076462
    My creations:
    1: Tracking system "Player is in Light?

    Comment


      #3
      Hello,
      A big big thank you for this gift ! ^^

      Comment


        #4
        Originally posted by Fen View Post
        Hello,
        A big big thank you for this gift ! ^^
        You're welcome But it's works now only in point light. Now i try create this in Spot light.
        Last edited by Degvello; 05-15-2015, 07:37 PM.
        My creations:
        1: Tracking system "Player is in Light?

        Comment


          #5
          This can be adapted for a few different things,

          1 idea is a game involving Vampires, where the player or AI can get a burning tick damage when entering sunlight.

          Awesome gift,

          thanks.

          Comment


            #6
            Just forgot about one thing, i'ts blueprint works if you crouch but need change feet vector-vector z value less than 75, because feet line trace if you start crouch begin touch floor and say as though player in shadow.
            My creations:
            1: Tracking system "Player is in Light?

            Comment


              #7
              Originally posted by Conkerballs View Post
              This can be adapted for a few different things,

              1 idea is a game involving Vampires, where the player or AI can get a burning tick damage when entering sunlight.

              Awesome gift,

              thanks.
              You can added this anywere
              My creations:
              1: Tracking system "Player is in Light?

              Comment


                #8
                Hello all.

                Here small updated in this system.

                If you use glass or another material through which the light passes.

                If you placed it system think you in the shadow.

                Click image for larger version

Name:	1.png
Views:	1
Size:	659.6 KB
ID:	1076505

                You need changed collision of this mesh.
                Change to Custom and in Trace Responses - Visibility set in Ignore.

                Click image for larger version

Name:	2.png
Views:	1
Size:	52.0 KB
ID:	1076506

                And now all works fine

                Click image for larger version

Name:	3.png
Views:	1
Size:	660.2 KB
ID:	1076507

                And again sorry for my bad Engilsh.

                Good luck
                My creations:
                1: Tracking system "Player is in Light?

                Comment


                  #9
                  This was incredibly helpful thank you so much! I figured out that you can make the sensor directional by building a physical barrier into the asset to block the sensor, and not allowing the line trace to ignore itself.

                  Comment


                    #10
                    Originally posted by Degvello View Post

                    You're welcome But it's works now only in point light. Now i try create this in Spot light.
                    Did you ever figure out a good way to do the spot light?

                    Comment

                    Working...
                    X