Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    '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.
    Click image for larger version

Name:	Raytrace2.jpg
Views:	1
Size:	293.2 KB
ID:	1144861

    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.
    Click image for larger version

Name:	Raytrace1.jpg
Views:	1
Size:	362.5 KB
ID:	1144860

    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
    Last edited by C Albeluhn; 02-26-2015, 10:23 PM.

    #2
    - Are you doing this in the preview, AMI, or the cooked version?

    I found there are HUGE differences between those three in 4.6. The differences have been minimalized in 4.7 (but still exists to a small degree).

    Comment


      #3
      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!

      Comment


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

        Comment


          #5
          Originally posted by C Albeluhn View Post
          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.
          If there is a solution to this, I REALLY could use that information. If you gathered a little more stats on it, could it be submitted as a bug? We are having all kinds of problems with our platformer due to this.

          Comment


            #6
            Hello 'The Britain'

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

            Here is the link: https://answers.unrealengine.com/que...t-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.

            Comment

            Working...
            X