Announcement

Collapse
No announcement yet.

Issues with single line trace, barely ever works.

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

    Issues with single line trace, barely ever works.

    So I have a single line trace that starts from the player location and ends where the mouse points in world space. The issue is that most of the time the line trace fails for no real reason, sometimes it's as easy as moving the mouse a pixel to the left and sometimes it refuses to work at all.

    This is the blueprint for the trace.

    Click image for larger version

Name:	singlelinetraceblueprint.png
Views:	1
Size:	201.7 KB
ID:	1137344

    And this is how it can look sometimes when I try it.

    Click image for larger version

Name:	singlelinetracebroken.png
Views:	1
Size:	619.1 KB
ID:	1137345

    Do anyone know what's causing the issue? Because I have no idea at all. The world location and mouse location does get updated, it's just that the trace fails. I've tried different traces and the same thing happens and I've tried object trace instead of channel trace and it's the same thing there too. Everything fires and works as I've got print strings to check if the trace worked or not. From what I can tell it does seem that tracing to static geometry instead of the landscape do have a higher success rate.

    #2
    Are you firing the trace with a tick event or a timer?
    FREE Lightshow
    FREE VR Drum Kit Project

    FREE Color LUT Collection
    FREE Physics Driven Spacecraft Project
    FREE GTA Style Vehicle Interaction
    Dynamic DoF(Depth of Field)
    Camera Crossfade

    Comment


      #3
      You need to make your end location slightly longer than what it needs to be. That should decrease the chance of it failing.
      Looking for blueprint tutorials? Then visit my blog... voxagon

      Comment


        #4
        Thanks, now it seems to always work. Maybe EPIC should add an option for allowing the trace to continue a few units in the trace node. I'm not sure if my way of doing it is actually correct, but hey it works. I'm just posting in case there would be some issues with it.

        Click image for larger version

Name:	works.png
Views:	1
Size:	156.3 KB
ID:	1053415

        Comment


          #5
          You could take the impact normal and times it by a negative number and add it to your location. That should do the same trick.
          Looking for blueprint tutorials? Then visit my blog... voxagon

          Comment

          Working...
          X