I need to do a trace from the ground up to detect if there is a static mesh on that ground. I have tried several line trace methods but it doesnt get me any blocking hit result as the line trace is technically “in” the static mesh. I must be missing something here. Please advise on the method! It has to be line trace from ground up (meaning Z axis).
SOLVED!! It got sorta solved in a way. And i have not idea what. FacePalm
It seems that there were some issues with the default third person map where the default static meshes were not registering traces correctly.
Example: where the floor was registering trace but not the ramp or the linear stairs.
So steps/settings that should work:
-
set TraceParams.bTraceComplex = true;
-
shooting traces from within ground up to the static mesh. Example :start with z at -15 and end with z at +15.
-
details of the static meshes. ticking on
- simulation generates hit
- multi Body Overlap
- Trace Complex on move
-
Ticking off on “3”. No idea why but that did do the trick!
-
creating a new static mesh by ctrl dragging? and playing around with its original static mesh template collision properties.
The last three steps were the ones that solved the issue.
Not sure this is what caused the problem for you but I had a similar issue recently. The fix for me was to properly setup the Ignored Actors/Components. My trace always starts inside the simplified collision of a static mesh, sometimes the corresponding static mesh component would be the HitResult which I wasn’t looking for (using LineTraceSingleByObjectType, CollisionQueryParams.bTraceComplex = false, CollisionObjectQueryParams = FCollisionObjectQueryParams::DefaultObjectQueryParam) and at other times it was the correct (different) static mesh component I was expecting for.
If that’s not the case for you hopefully this info will be useful for anyone else.