Impact point from MultiSphere trace returns mirrored result

Basically what I have been trying to do is to align actors along a road mesh and have them face the road mesh. I majorly have the problem in getting the nearest point, for which I am using MultiSphere trace to check if they are in bounds of the road actor and to return the shortest distance after which I use the impact point as the target location for the Find Look at Rotation. However it wasn’t working and debugging I found out that the hit location is being translated on the Z-Axis plane. Here are some screenshots for better understanding.


Top view

Blue points are the hit points that are for some reason being translated on the z axis

Here is the find hit location code. Its pretty much default

Could it be because you are using the same start and end point for the sphere trace that it could be flipped? I think you need to give it the correct direction (put an offset in the axis towards the direction you are tracing in (probably add down vector with a float offset to the start location)).

Having the same start and end might be throwing off your hit result normals it it’s testing at a bad angle.

Thanks for the reply. You were right I was able to get the the impact points correctly with an offset at the start location.

For anyone new I am attaching the screenshot of the correct result and of the implementation of 3dRaven’s solution.


The Correct Implementation

The Implementation