LineTrace hit detection causing value to be world origin

As part of a program we are using, we are drawing GeoJSON features using splines. Traditionally, in UE4, we were able to trace down and hit the ground to find the Z value to spawn features in. In UE5 we are experiencing some weird issues, some of which seems to stem from wonky collision (I’ve also posted this in the Unreal Forums).

The top picture shows where I clicked, and where the hit was sent to. Checking the value, it sends it to the wherever the World Origin is for the Cesium Georeference.

The bottom picture shows a correct hit detection in the correct location. This is repeatable for various locations around our height data, in some cases large areas cause incorrect hit detection.

In the above picture, any click within the red circle results in a trace where the pink line is.

Any help would be greatly appreciated! This is not an issue we faced in Unreal 4.

2 Likes

Update:

After some more testing, the terrain does not have collision at all. I’m able to take my pawn and fly straight through the Earth.

Hi @MackSTerris,

We have a bug in v1.13 causing Unreal to have incorrect bounding volumes, especially for tiles far from the georeference origin. There’s a pretty good chance this will cause collision and line trace problems, too. I’ve submitted a fix here:

I’ll post an update here when a UE5 build is available that you can try. With any luck, this will fix the problems you’re seeing.

Kevin

2 Likes

@Kevin_Ring

Thanks for the feedback! Glad to know there’s a potential fix, it was an elusive hunt for the problem.

@Kevin_Ring

To test if it would fix my issue, I added those changes to a local copy of the plugin. On the outset, it does not appear to fix our issue. I did some more testing, and found out the following information;

We use a custom WMTS component we’ve built to serve our own imagery. When using this component, we see more “holes” than when using the Ion base-terrain overlay (it is essentially the TMS component but modified to work with a WMTS URL). However, even with the Ion overlay we lose collision in higher density mesh terrain. When using the base map height data, collision works as intended.

I’ve tried checking the generated chunks for any consistent “holes” but I’ve been unable to find a pattern.

1 Like

To be doubly sure, I pulled the latest version of Cesium Unreal, as well as the Cesium Samples and added the boundingbox fixes listed above.

I did test it without, and with, the changes. As you can see in this video, the hits are not registered around the seams of the chunks, and at a certain distance away from the corners/edges.

It’s worth noting that this is with data we ingested using Ion. The basemap does not appear to have these issues.

1 Like

I saw there was an update to the Cesium plugin today. I updated our plugin and tested the same scenarios. While the basemap hit detection has improved, our data in Ion is still spawning missing collisions.

Hi @MackSTerris,

Thank you for providing additional detail about this issue. Can you share information about the source model? Specifically, what format was it before you tiled it, and what tool did you use to create it?

Hi @agallegos ,

No worries! I’m happy to provide any additional info you need. As a note (and I think I stated above) we do not experience these collision issues in Unreal 4. It is with any dataset we currently have in Ion. We have a total of 10 or 11 datasets and all of them come into the Cesium plugin with hit detection issues. I’ve just been using the one in the video/pictures as a consistent testing bed to try and find out what’s going on.

The dataset in question was collated through government sources (mostly open-source DSMs) internally using QGis.

Thanks @MackSTerris! We’re looking in to this.

Can you send me the asset ID of one of the tilesets that is demonstrating this issue? Additionally, if you are able to share your project files that would be helpful, but no worries if you can’t. You can DM me if you prefer.

-Alex