Announcement

Collapse
No announcement yet.

Creating laser beam to walk on

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

    Creating laser beam to walk on

    Hi, I want to create laserbeam to walk in similar to the one in portal. I dont know if its my bad but I can't find any tutorial for that.

    I guess I need to adjust a mesh the size of a raycast but I am new here and dont know what to do.

    thanks in advance

    #2
    [MENTION=122829]fapocalips[/MENTION]:

    Could you maybe provide us a video link, where the laserbeam feature in portal is shown? That might make it easier to understand, what you actually want to do. I might be able to help you further . If you can, explain it in more detail. Then we might have more of a clue, what you exactly want to do .
    Main channel:
    https://www.youtube.com/channel/UCGC...o9s3YcA/videos

    Comment


      #3
      of course here an exemple

      https://www.youtube.com/watch?v=hapIX7pAcNI

      the blue laser bridge

      Comment


        #4
        that looks more like just a plane with a fancy material on it to me.........
        Come Join Me On Patreon : https://www.patreon.com/iamjohngalt75 Or Visit Me On Youtube : https://www.youtube.com/channel/UCpu...wyusqni1ZnWdBQ

        Comment


          #5
          It not the visual that I want to know how, its the behaviour

          Comment


            #6
            all of it is pprecited but what I want is how to create some kind of dynamic surface that the player want to walk on it an with a scale that transform when he hits a obstacle, like a walkable beam, its no the visual im interested in

            Comment


              #7
              Originally posted by fapocalips View Post
              all of it is pprecited but what I want is how to create some kind of dynamic surface that the player want to walk on it an with a scale that transform when he hits a obstacle, like a walkable beam, its no the visual im interested in
              Matinee, Sequencer, Timeline... can all animate moving drawbridge affect.
              Or you can use Transform and change the scale of the walkway in a loop.
              Or use SetActorLocation / AddActorOffset to move the walkway in a loop...
              Search for threads that cover 'moving platforms', if that's what you need...

              Comment


                #8
                I ll try but I really don't think its that.

                What I want is really some king of laser thatgoes from a point(any point)and stop when he hit an obstacle but this laser is a walking surface

                Comment


                  #9
                  Originally posted by fapocalips View Post
                  I ll try but I really don't think its that.

                  What I want is really some king of laser thatgoes from a point(any point)and stop when he hit an obstacle but this laser is a walking surface
                  What you want to do is use a linetrace from the origin until it hits something. From there, break the hit and get the Impact Location. Do Get Actor Location - Impact Location -> Vector Length to get the distance. Use this distance to scale the mesh in the X axis using proportions
                  [WIP] Procedural City Generator | RPG AI
                  [MARKETPLACE] Animal Behavior Kit | Space Shooter Template | Procedural Foliage Tool | Procedural Park
                  [FREE] Modular Road Tool | Action Platformer Template | Radar BP | Free Birds | Procedural Buildings
                  Join our Discord

                  Comment


                    #10
                    that sound more like it thanks

                    Comment


                      #11
                      Do you mind giving me extra help. I know you helped me greatly but I tried this solution and I guess I still dont exactly get it this is What I have so far

                      Click image for larger version

Name:	laserTrace.png
Views:	1
Size:	148.1 KB
ID:	1129267

                      The mesh scale appropriatly but does not stop when the linetrace hit smething, I am not sure what is wrong,

                      Thanks again

                      Comment


                        #12
                        Originally posted by fapocalips View Post
                        Do you mind giving me extra help. I know you helped me greatly but I tried this solution and I guess I still dont exactly get it this is What I have so far

                        [ATTACH=CONFIG]144344[/ATTACH]

                        The mesh scale appropriatly but does not stop when the linetrace hit smething, I am not sure what is wrong,

                        Thanks again
                        Hi Fapocalips,

                        A few things to try out.

                        On the line trace, select Draw Debug Type dropdown and select "For Duration." Now you can see the actual ray...is it hitting something and stopping? Or is it going thru geometry?

                        Another thing, Make sure the vector length is correct. I would still explicitly do Actor Location - Impact Point -> Vector length just to be safe.

                        Also, you want to resize the mesh by using dividing the distance by the mesh size (proportion).

                        Click image for larger version

Name:	Trace1.jpg
Views:	1
Size:	214.0 KB
ID:	1129301
                        Click image for larger version

Name:	trace2.jpg
Views:	1
Size:	215.7 KB
ID:	1129302
                        [WIP] Procedural City Generator | RPG AI
                        [MARKETPLACE] Animal Behavior Kit | Space Shooter Template | Procedural Foliage Tool | Procedural Park
                        [FREE] Modular Road Tool | Action Platformer Template | Radar BP | Free Birds | Procedural Buildings
                        Join our Discord

                        Comment


                          #13
                          Yup the trace work fine, it is red and become green when hit something, Your code is interesting but I am curious, what is the purpose of the spline in this context

                          Comment


                            #14
                            Originally posted by fapocalips View Post
                            Yup the trace work fine, it is red and become green when hit something, Your code is interesting but I am curious, what is the purpose of the spline in this context
                            Hmm, if the hit is correct then its probably something to do with the mesh scaling calculation. The code above is from my road builder tool. Im using a trace to get the distance from the track to the floor and scaling the "support." You can see the tool working here:


                            [WIP] Procedural City Generator | RPG AI
                            [MARKETPLACE] Animal Behavior Kit | Space Shooter Template | Procedural Foliage Tool | Procedural Park
                            [FREE] Modular Road Tool | Action Platformer Template | Radar BP | Free Birds | Procedural Buildings
                            Join our Discord

                            Comment


                              #15
                              Just wanted to say that I finally make it work , greatly thanks for all your help

                              Comment

                              Working...
                              X