Announcement

Collapse
No announcement yet.

How the heck does a Sphere trace work?

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

    How the heck does a Sphere trace work?

    I was asuming that i have a starting vector and an ending vector. at the impact point there will be a sperical trace with a given radius wich returns me the first hit it occours. But since this isnt working (single line trace returns me a perfect result) iam wondering how this is going to be used. Any suggestions. (and yes collision is set properly)
    Free Inventory System (BP AND C++ Version): Clicky Clicky
    Player Structure System (Houses!) (BP): Pew Pew Marketplace Version: Yoink!
    Howto: Create Dragable UMG Windows: Zoom Zoom

    #2
    A sphere trace sweeps a sphere ACROSS a given line. Think of a line trace as being like, a point sweep; you start with a point, and move it forward along a vector until it hits something. A sphere trace works like that, but it sweeps an entire sphere along the line.

    It seems like you're expecting the line trace that generates a sphere at the end point..? That isn't what it does.

    My advice is to use Draw Debug to show the trace; this way, you can see exactly what it's doing and maybe determine why it isn't working like you expected.

    Comment


      #3
      Originally posted by RhythmScript View Post
      A sphere trace sweeps a sphere ACROSS a given line. Think of a line trace as being like, a point sweep; you start with a point, and move it forward along a vector until it hits something. A sphere trace works like that, but it sweeps an entire sphere along the line.

      It seems like you're expecting the line trace that generates a sphere at the end point..? That isn't what it does.

      My advice is to use Draw Debug to show the trace; this way, you can see exactly what it's doing and maybe determine why it isn't working like you expected.
      The Sphere is drawn at an impact point i just dont get any results thats the problem.

      Edit: Got it working it seems the problem was that Starting and Ending Point were the same (because i just needed a sperical trace at a given point. Thought the sphere will grow instead of moveing from a to b
      Last edited by ruohki; 11-30-2014, 08:06 AM.
      Free Inventory System (BP AND C++ Version): Clicky Clicky
      Player Structure System (Houses!) (BP): Pew Pew Marketplace Version: Yoink!
      Howto: Create Dragable UMG Windows: Zoom Zoom

      Comment


        #4
        Are you sweeping for objects or by channel? Can you post a screenshot of the BP that fires the trace and also a screenshot of the PIE with the Draw Debug trace being performed?

        Comment


          #5
          I was sweeping for Channel's (Custom Trace Channel), but as i said i got it working. Didnt realize that the trace actually has to "travel" to hit something

          Click image for larger version

Name:	Unbenannt-2.png
Views:	1
Size:	148.5 KB
ID:	1061557
          Free Inventory System (BP AND C++ Version): Clicky Clicky
          Player Structure System (Houses!) (BP): Pew Pew Marketplace Version: Yoink!
          Howto: Create Dragable UMG Windows: Zoom Zoom

          Comment

          Working...
          X