This issue has taken a long time to track down. The symptoms are:
If the actor containing a SplineMeshComponent is transformed then the collision attached to the component is properly updated and matches the actual location of the component. Overlaps are properly calculated with overlapping actors.
If the SplineMeshComponent is moved independently of its actor by calling set start, end etc. followed by update mesh then these issues occur:
Get overlapping actors/components often returns actors/components that the spline mesh was overlapping before the move, even if they are clearly no longer overlapping visually
Get overlapping actors/components does not consistently return actors/components that the spline mesh is visually clearly overlapping
The spline mesh component’s collision has holes where overlap events should occur but don’t
(this is what made this hard to track down) When using the ‘show Collision’ console command the collision components of the spline mesh appear to be in the correct place, but the actual collision volumes used for calculation do not match what is shown visually.
The following workaround fixes this issue and is done after calling update mesh:
Get actor transform
Set actor transform with +someValue to at least one of the components
Set actor transform with -someValue to the component
This seems to force the collision to be properly updated because UE4 considers that the actor has moved. It’s necessary to call set actor transform twice because if you just feed in the current values from get actor transform unchanged UE4 ignores it and the collision isn’t updated.
Making the spline mesh the root component has no effect on this issue. I have ‘Use Simple Collisions as Complex’ set on this component as it updates on tick when moving (tracking VR motion controllers) and complex collisions kill the frame-rate.
Could you try testing this in the latest 4.15.1 build of the engine? There was some changes made to spline mesh component collision (specifically JIRA UE-39212) and if very possible this issue has already been fixed.
I’m having trouble getting the overlap issue you described to reproduce. Would you be able to create a new test project that has the issue and upload it here?
I’ll be on the lookout for other reports of this but in the meantime I’ll resolve this post for tracking purposes. When you have time to dig into this more, just post a comment back here to reopen the post.
I know this is a very old threat but the issue still persists with inconsistent overlap detection with spline meshes. I have a simple class that builds the spline mesh using the mouse coordinates as the EndPoint and it has trouble recognizing any overlap with a simple box collision.
The workaround posted above or anything that moves the actor even by 0.1 makes it work properly.