Announcement

Collapse
No announcement yet.

Multi Sphere Trace Bugged?

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

    Multi Sphere Trace Bugged?

    My goal is to create a beam between two actors that breaks when vision between the actors is obstructed. For some reason the Multi Sphere Trace is capable of tracing through walls that I have set to block Visibility and camera traces. These same walls block regular line traces as intended. Furthermore the Multi Sphere Trace appears to randomly decide which angle an object can not be traced each time I load my game; sometimes the trace comes back false when I stand in front of the actor and other times I need to crouch or stand at the side.

    At the start of this video I demonstrate a simple line trace and print string to show Visibility is blocked by nearby objects. I later use the line trace to show that Visibility is blocked yet Multi Sphere Trace manages to find the target or even decide not to when Visibility is available.


    In this picture I show the Multi Sphere Trace that is looking for the actor the beam is connected to. This actor is stored as a variable when the beam is created upon a successful line trace to a pawn target. For this image I disabled the beam's ability to destroy itself when Visibility is blocked but the Print Strings show visibility is never lost except when the Multi Sphere Trace seems to decide not to find the target actor.
    Click image for larger version

Name:	sphere trace.png
Views:	1
Size:	179.8 KB
ID:	1226316

    #2
    Where do you clear "visible targets"? Ok, maybe you never have to because this piece of Blueprint is on tick?

    I suggest you create a widget that permanently displays which target is currently targeted by your raycast.
    [Released] Multiplayer Combat Editor
    A-RPG Sacred Swords
    Auto-Chess Live Development
    Youtube Tutorials

    Comment


      #3
      Originally posted by Yun-Kun View Post
      Where do you clear "visible targets"? Ok, maybe you never have to because this piece of Blueprint is on tick?
      Correct, my blueprint has other ways to clear the Target variable (distance from actor, energy available, ect). The issue I currently have is once the beam attaches to an actor there is nothing to stop the beam from maintaining connection through walls as seen in the video. I intend the Sphere Trace Tick to clear the Target if visibility is obstructed thus breaking the beam on an "is valid" check later in the blueprint.

      For this troubleshooting I created this loop to tell me if the Sphere Trace is being blocked by Visibility or not without breaking the beam otherwise I'd have to re-trace every time it randomly decides to not find my target in a sphere trace. If a box or a wall occludes visibility between the two actors the Sphere trace is supposed to come back negative and clear the Target variable...unfortunately Visibility Traces from a Sphere trace does not appear to function properly. A regular Line Trace works 100% of the time as intended with Visibility channel, this Multi Sphere Trace does not.

      If there is another way to check if the target player is visibly blocked by an object I'd like to hear about it. I'd rather never see the beam pass across a wall but Visibility tracing every frame is killer on the frames.
      Last edited by Xnar; 08-05-2017, 10:56 AM.

      Comment


        #4
        I need to see how the whole process works (start tracing, check trace and all the likes).

        I can't figure it out for now.
        [Released] Multiplayer Combat Editor
        A-RPG Sacred Swords
        Auto-Chess Live Development
        Youtube Tutorials

        Comment


          #5
          https://blueprintue.com/blueprint/jgvmyrcp/

          If this is not legible I'll take the time to do some print screens and past them together

          Comment


            #6
            Ah ah

            I can't really help you until you organized all of it. I don't even know how you can debug this

            But from my experience, there is no bug with Multi Sphere Trace by Channel.
            [Released] Multiplayer Combat Editor
            A-RPG Sacred Swords
            Auto-Chess Live Development
            Youtube Tutorials

            Comment


              #7
              Originally posted by Yun-Kun View Post
              I can't really help you until you organized all of it.
              cleaned it up https://blueprintue.com/blueprint/jgvmyrcp/

              I also took the liberty of setting the Multi Sphere trace to the way I intend it to function; located on the far right side of the graph. The sphere trace will periodically check if the Link target is in line of sight. In the event the sphere trace returns negative it will try again after two seconds in which case the beam will destroy itself if the Link target is negative a second time. The problem I have is as seen in the video in the OP, the Visibility Trace does not seem to work or be reliable for the Sphere trace; Sphere Trace is able to trace through walls even with Visibility blocked as demonstrated by the Video's line trace.
              Last edited by Xnar; 08-05-2017, 05:03 PM.

              Comment


                #8
                I may be mistaken, but when you trace by visibility it is actually looking for actors/objects that are set to visible in the engine, not by LoS. I would do it by a line trace from the players location to the target location and if there is any obstructions, break the link. Also (may be wrong about this as well) why not add the object to your "visible targets" array and clear it later? From the looks of it, your array variable is being over written by the last object it finds in the sphere trace. So there is only one object in the array when you get to the "contains" check. Im at work right now, so I cant test it, but I think these are the issues you are running into.

                Comment


                  #9
                  Originally posted by Thuranius View Post
                  visibility it is actually looking for actors/objects that are set to visible in the engine, not by LoS.
                  ...omg I you're correct.

                  Originally posted by Thuranius View Post
                  I would do it by a line trace from the players location to the target location
                  ^ this will definitely be the solution to my issue. Start the Line trace at my Actor's location and the End trace at the target Actor's location. For whatever reason my brain was fixed on the idea the Line trace always pointed with the camera *smh*

                  Finished Product. Problem Solved. Thanks so much for the help and enlightenment. https://blueprintue.com/blueprint/jgvmyrcp/

                  Comment


                    #10
                    Glad I could help

                    Comment

                    Working...
                    X