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.
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.
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