Line Traces suddenly ignores dynamic content

Seldomly linetraces stops working for no reason. making a trace on the visibility channel switches from detecting all visible content to only detect static meshes.
I have tried printing and checking all collision and they are still enabled and still on the same channel.
When the bug happens, the traces you get when you use ToggleDebugCamera is also ruined.
I have uploaded a video which first shows the normal state and then the bugged state.

https://drive.google.com/open?id=0ByEdPmxsYusDTW1BR1RRWlhjWlU

In the video : The units and the ring are different types of dynamic objects which does not react to line traces after the bug… i have tested on many other objects and only the static ones react.

Anyone has any idea what could have caused this?

We have recently first switched from 4.12->4.14 and then a few weeks later to 4.15. I have first noticed it in 4.15 but I’m not ruling out a 100% it could have come from the other engine update.

Bonus info: A few times the bug has happened the distance to the camera has mattered, so the linetrace would detect all static meshes in the way of the trace, but only dynamic meshes further then some X distance away.

Hi Vejgaard,

I haven’t experienced anything like this in my usage or testing. I wouldn’t be able to create a bug report for this unless I was able to get a repro in-house. If you are able to reproduce this in a small test project, let me know. Please include the project itself and exact repro steps.

It sounds to me that there is an issue somewhere in the engine code after upgrading engine version. If you prefer, we can move this over to Using UE4 or C++ and see if someone can dig into it deeper.

Cheers,

TJ

I would be cool if you would move it over to Using UE4! I think it will be hard to reproduce in an small test project + we are a little strapped for time right now.

This is really urgent for us, to help things i made another video showing the bug
https://drive.google.com/open?id=0ByEdPmxsYusDUllGV0xubjhuQkk
This video shows me spheretracing on the four channels we have, first all going through an actor (all dynamic actors are affected by the bug)… then i show traces hitting another actor from one angle and not from another.

The bug occurs mostly when the framerate is low or we speed up time… anyone has any ideas?

Additional info:
We somethings get some error messages to our logs which might be connected… though they don’t necessary show up at the same time… it looks to be from the particle system, but it still seems to occur when all particle systems are deleted:

[2017.03.16-12.26.58:490][894]LogParticles:Error: Bad values in FParticleSystemSceneProxy::GetObjectPositionAndScale
[2017.03.16-12.26.58:493][894]LogParticles:Error: SystemPositionForMacroUVs: {-163731849904914432.000000, -169070837851226112.000000, -3180076524208390144.000000}
[2017.03.16-12.26.58:494][894]LogParticles:Error: ObjectPostProjectionPositionWithW: {-251276769594703872.000000, -4417481753514475520.000000, 10.000000, 2521547949129859072.000000}
[2017.03.16-12.26.58:495][894]LogParticles:Error: RightPostProjectionPosition: {-251276769594703872.000000, -4417481753514475520.000000, 10.000000, 2521547949129859072.000000}
[2017.03.16-12.26.58:495][894]LogParticles:Error: UpPostProjectionPosition: {-251276769594703872.000000, -4417481753514475520.000000, 10.000000, 2521547949129859072.000000}
[2017.03.16-12.26.58:495][894]LogParticles:Error: ObjectNDCPosition: {-0.099652, -1.751893}
[2017.03.16-12.26.58:496][894]LogParticles:Error: RightNDCPosX: -0.099652
[2017.03.16-12.26.58:496][894]LogParticles:Error: UpNDCPosY: -1.751893
[2017.03.16-12.26.58:496][894]LogParticles:Error: MacroUVPosition: {-163731849904914432.000000, -169070837851226112.000000, -3180076524208390144.000000}
[2017.03.16-12.26.58:503][894]LogParticles:Error: MacroUVRadius: 200.000000
[2017.03.16-12.26.58:506][894]LogParticles:Error: DX: 0.000000
[2017.03.16-12.26.58:507][894]LogParticles:Error: DY: 0.000000
[2017.03.16-12.26.58:507][894]LogParticles:Error: View0: {0.979848, 0.199743, -0.000000, 1.000000}
[2017.03.16-12.26.58:508][894]LogParticles:Error: View1: {0.153012, -0.750609, 0.642786, 1.000000}

We are also experiencing this exact issue ever since upgrading from 4.13 to 4.15. Have you found a workaround?

Symptoms:

  • Once the issue triggers the Camera distance and angle affects whether the trace works or not.
  • We don’t know what is triggering it. In our automated testing it can happen within 10minutes or after several hours. It is sporadic but reproducible.
  • Once the issue happens we are also able to save and load the game and the issue persists.

We have tried different types of traces, outputting and verifying the collision channels and collision boxes are all valid.

We have reverted back to the 4.13 revision and absolutely can’t reproduce the issue. We think this is an engine bug or physX.

Hi Raf.
We did find out what caused our problem = meshes far away from the main content.
We had some poorly animated meshes simulating coins coming to the player screen. When speeding up time or when the framerate was low, these meshes would fly out in the universe towards infinity. (it also took some time for our coins to get far enough away)
It seems like if the world is to big (i.e. meshes faaaar away), tracing becomes unstable + input bugs started to happen as well.

I hope this helps solve your problem.

Thanks Vejgaard for sharing your solution!

Unfortunately we haven’t been able to find a direct cause as in your case. Our main map (world) is very large but within the limits of UE4. I’m going to open a separate post so epic can respond, we think this is an engine bug they will want to fix. Thanks again.

EDIT:
Just to update that we did finally solve it. We found the dynamically spawned mesh causing the problem in a similar scenario as yours, it’s location was so extremely large (not initialized) that it was beyond the bounds of the map.