'Line Trace by Channel' appears to be offset at high speeds

Hello everyone.

I am hoping that someone out there could give me a bit of a hand with one aspect of the project I’m working on. I created a solar system app a while back, and I am looking to re-do it in the UE4 engine with lots of bells and whistles applied to it. Because it’s a solar system app, I am dealing with large distances for the locations of the planets, small planet assets, and fast animations for the planets rotating around the sun.

The issue I ran into deals with the ‘Line Trace by Channel’. I have it working nicely for the project, and I use it for detecting when the planets have been clicked on. Everything works perfectly when the planets animate around the sun slowly (both when the planets are small and scaled up for easier viewing), however when I speed them up to high speeds, I have to click in front of the planets (where they’ll be traveling to) in order for the Line Trace to register.

I took two screenshots to illustrate my issue.

Here you can see that when I click on the planet, the Line Trace registers correctly. Because the planet is in motion, the trace lines and hit locations trail behind.
9883a83b08203a4ef10570889d5d60be2432b398.jpeg

In this image, you can’t see the hit locations, however where I was clicking was at the end of the green lines on the far right hand side. In order to select the planet at high speeds, this area was the only area that registered correctly.
ba8914e14ddd5d5869f3701f891d1830dbe8ac2d.jpeg

The only thing I can think of is maybe the Line trace is calculated before or after the frame is processed (i’m not sure which one would cause the issue) so the position of the collision has changed slightly from the time the planet was last rendered.

I’m not a programmer, so I’m not sure exactly what would be causing the issue, but some input would be much appreciated.

Thanks in advance for the help guys, it’s appreciated.

[Edit] I should mention that I’m using the 4.6 engine

That’s something I haven’t considered checking out. The testing I have done was all in the Preview mode. I’ll take a look at it later tonight and get back to you on if cooking the game helped or not. I’ll also make a copy of my project for version 4.7 and try it out there as well.

Thanks for the tip, lets hope it helps!

I have tested this out in different ways, and I am still running into the same problem. I was curious on how the ‘Line Trace’ might be processed (Being calculated before the frame is rendered VS after the frame is rendered), so I created an ‘OnClicked’ node for the planet to see what that would do. I plugged it into a ‘print string’ so I could get a visualization on it being clicked. The hit location both for the ‘Line Trace’ and the ‘OnClicked’ appear to be calculated ahead of what is rendered on the screen, and are in the exact same location. I have also tested this in 4.7.1, and the same issue occurs.

Hello ‘The Britain’

I have posted a bug report for this on the UE4 Answer hub.

Here is the link: https://answers.unrealengine.com/questions/187245/line-trace-by-channel-appears-to-be-offset-at-high.html

To help make things a bit easier, I included a stripped down version of my project in the bug report so they can see exactly what I’m seeing. Lets hope someone can give us a hand with this issue. :slight_smile: