Line Trace or collision not accurate?

Hi! I have a problem regarding the collision using a ‘Line Trace By Channel’ or ‘Get Hit Result Under Cursor By Channel’. There is sometimes an offset with the collision. When i activate the Show Collision option it looks good.
I have the option ‘Complexe Trace’ on.
I use line trace to stick a spline along a mesh.

I have no idea where it could come from…
Thanks!

345932-collisionbug.png

Yes he got collision, you can see it on the picture (i activated show collision). The purple squares show impact Point, collision work but there is an offset.

Another exemple without debug info and the mesh is hidden this time:

345922-exemple2.png

Here is another image of the mesh, i dont know if it can help

The red line means it’s not finding anything. Does the mesh have collision?

Could it be the floating point error?

  • how far away from the world centre are we
  • how long is the trace

Could you show your tracing method?

Hmm, really don’t know, sorry.

I would try just tracing from a stand alone blueprint to the mesh and move the blueprint around a lot to make sure your tracing works the way you think it should.

Apart from that, there can certainly be some gotchas to working with splines.

I dont think it’s floating point error,

  • World location -800x/1100y/1400z
  • Both Linetrace and Get Hit Result Under Cursor By Channel reproduce the bug… (+the line trace is not long, less than 1000 units)

345999-linetraceexemple.png

Can you show the vector code going into the line trace? ( that’s the crucial bit ).

Yes, if i can’t fix the ‘collision’ bug then i will fix it by detecting the offset points

I dont think the problem is here, line trace look good :frowning:

Hey, i just noticed that the bug is reproducing on specific areas on the mesh…

346015-areacollisionbug.png

That’s worth following up…

Look like the line trace passe sometimes through the first collision, idk if it that can be that or not

I dont know, I never used ‘show player collision’ but I don’t think it displays anything useful in my case

346070-showplayercollision.png

Ok i found the bug it’s probably a floating point error on collisions. It’s because I resized the mesh x100 after the import, the collisions are good if i scale before the import. It’s still weird that the ‘show collision’ option doesn’t show errors…

Ah, but show player collision would have probably alerted you to it?..

If the collision was off from scaling, you would see it here.

Collision look good but errors still here :frowning:

Hello,

We’ve made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks,

Marinna

Out of sheer curiosity how far does the trace penetrate through the mesh?