Sphere casts returning wrong hit against mesh colliders on android

Hello,

We are experiencing a bug, where sphere casting returns jittery and not accurate results on Android devices (tested on Samsung Galaxy S23, Google Pixel 7a). We can reproduce the problem in 3rd person template project with latest 5.5.4 engine.

I was testing the issue by comparing results from Sphere cast with radius 0 (which is translated to raycast) and sphere cast with radius 10. In editor & win build results from those two are mostly aligned, but in android build both normal and hit position are jittery and not correct for sphere cast.

[Image Removed]

Here is an example of incorrect hit on android device, please note white & red arrows (normals for ray cast & sphere cast)

[Image Removed]

[Image Removed]

Similar situation from editor’s correct behavior:

[Image Removed]

Issue is clear from videos which are part of the attachment: SphereCastAndroid.mp4 & SphereCastEditor.mkv

On android device, it is easy to see how jittery and incorrect resulting hits are.

Steps to Reproduce

  • open attached project and ThirdPersonMap
  • Run the level and fly around with debug pawn inside cave collider
  • Raycats and sphere casts are implemented in BP_DebugPawn event graph
  • Observe results in editor
  • Use quick launch and run on android device
  • Observe incorrect hits and jittery normals for red arrow when pawn is moving or rotating

Hi Martin, and thank you for reaching out.

I’ve heard of a couple of similar issues over the past few months, but nothing which we’ve been able to get a repro on, so the attached project is very much appreciated! The other cases have been more rare edge case though - so I am really curious to dig into what the underlying issue is there.

My expectation is that there is a floating point issue somewhere, either through instruction reordering, or SIMD operations.

I’ll dig into and get back to you!

All the best

Geoff Stacey

Developer Relations

Hi Martin,

If you have access to our perforce mainline, could you pick CL 41276716 and CL 41495985 and let me know if that fixed your issue please? These are both improvements to the collision detection algorithms which may solve this. I can’t actually reproduce this on latest (although I do get the issue on 5.5 so it does look to have been fixed.

All the best

Geoff

Hello [mention removed]​, sorry for late response. It took me a while to get access from our IT. Looks like those two provided CL’s are restricted and we don’'t have access to them.

Confirming it is fixed in 5.6

Hi Martin,

Great to hear. Do you still require the CLs or are you going to upgrade to 5.6?

Geoff

We will be upgrading to 5.6 Thanks for the support! :slight_smile:

No worries Martin, glad to hear all sorted! I’ll get this closed off in that case.

All the best

Geoff