[4.22] "SphereTraceForObjects" node is not working anymore

Hello,

I migrated my project from 4.21 to 4.22 and noticed that my lock on event which uses sphere trace for object is not working. It does not generate any hits.

I also tried creating a new project from scratch and the same thing happens.

Thank you.

I have the same issue as well with multispheretraceforobjects

I have the same problem in 4.22, I checked

  • “SphereTraceByChannel”
  • “SphereTraceForObjects”
  • “BoxTraceByChannel”
  • “BoxTraceForObjects”

they do not work

— edit —

The amendment does not work if the start/end trace same.

in 4.21 it works with the start / end same

start = getActorLocation()

end = getActorLocation()

Hello,

We’ve recently 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

I have checked with a different start and end vectors and and confirm that it works.

I have reported the issue and linked to this thread using the new submission form.

Hopefully this will get fixed soon.

Hey, guys, I looked at the source code of the trace function, it looks like it should be.
MyWorld->SweepSingleByChannel() → FPhysicsInterface::GeomSweepSingle() - > TSceneCastCommon()

https://github.com/EpicGames/UnrealEngine/blob/7d9919ac7bfd80b7483012eab342cb427d60e8c9/Engine/Source/Runtime/Engine/Private/Collision/SceneQuery.cpp#L340

Here is the delta between the beginning and the end, and then there is a check that the difference is not too small.
If the difference is less than a very small number, then the trace will not work.

    bool bHaveBlockingHit = false;

    FVector Delta = End - Start;
	float DeltaMag = Delta.Size();
	float MinBlockingDistance = DeltaMag;
	if (DeltaMag > KINDA_SMALL_NUMBER)
	{
        trace true
    }
    bHaveBlockingHit = bBlockingHit;
    return bHaveBlockingHit;

You can use collision components (USphereCollision and etc) or these functions below.

Hello all,

This is a known issue,

as a workaround, make the start or end position a tiny bit different.

This is a huge problem, please up vote the issue.

These functions only provide overlapped actors/components, not Hit result, so this is useless in most cases…

I have the same issue with Line tracing, as well as.
I have a custom collision channel set up, and when doing a LineTrace by Channel, or a UnderCursor by Cannel it doesnt detect any collision…
Made my whole project unusable…

My entire project’s AI is broken because of this issue, I am using the sphere trace as a proximity filter before doing anymore work with the AI to target so when this is broken it never moves forward. This is the method they show in the AI tutorials surprised this wasn’t fixed in a point release.

As far as i know this still hasn’t been addressed. As is stated above, this isn’t a minor thing and affects all shape based traces as far as I can tell. This is a massive issue.
At the VERY LEAST we should have been informed that this was going to be required for traces from now on if it was a design decision. This took me literally weeks to find the issue after I updated my project.

This was assigned to a new engineer last week and is internally classified as ‘in progress’ (so that’s something!)

In the meantime, making the end different from the start even just by one unit will workaround this!

Ok, thank you for the response. I was a bit worried I would have to revert to an older engine version because of this bug

I have to say that nowdays this still happens and Im upgrading Unreal Engine of my project from 4.19.2 to 4.22.2. It broke many of the mechanics I did to my game which used Multisphere Trace Objects, Line and capsule. All of them stop working. The fix I did was adding 0.01 to the End vector entry

The same is happening to me using SweepSingleByChannel in c++ using a sphere with FCollisionShape::MakeSphere.

I used the same vector for start and end. It worked in 4.21 but not in 4.22. I fixed it by adding a small offset to the start vector.

As far as i am aware its still present as it just rendered all my line/box/sphere and capsule trace by custom channel broken in the 22.3 build, i am unable to register any hit with them.

No Adding an offset at the start or end makes no difference.

Thanks for working on this. We upgraded to 4.23 today and several major features in our game broke due to this bug. For now I will implement the work-around, but I will have this frowny face until I can remove them :frowning: