I have a house mesh that’s split up into several different static meshes: one for the outer walls, a few for inner walls, etc. To prevent having to worry about which collision box should belong where, I put them all in the outer wall mesh.
Now the strange thing is that when I attempt to perform a line trace through an inner wall, said inner wall is not sensed.
It only works if I’m overlapping the outer wall MESH while I’m preforming this trace.
This makes no sense to me. Why does the mesh matter (especially when I’m not even tracing through it)? Shouldn’t it be operating on only the collision primitives? Player-Wall collision does work properly–just that a line trace does not.
Here’s the code I’m using:
// CollisionParams is just to draw the trace line for debug
FHitResult HitResult(ForceInit);
GetWorld()->LineTraceSingle(HitResult, targetLoc, playerLoc, CollisionParams, FCollisionObjectQueryParams::AllObjects);
What’s going on here and how can I get this to work?