(Edit: View my first comment below to see the function that causes the buggy behaviour)
ProceduralMeshComponents do not collide with anything, even with ECR_Block as response to all channels.
All the objects it should collide with are also ECR_Block on all channels, I also tried it with ECR_Overlapp.
The Component nor the Actors ever receive any overlaps. GetOverlappingActors / Components always return an empty array.
Yes, I set the last bool in CreateMeshSection to true.
Yes, I called ->SetEnableCollision(true), also for the parent actor
Yes, I set EnableCollision to Query AND Physics
However, mouse-line traces work. I can’t click through those objects…
I think I got the function that is triggering this bug. After I call AddLocalRoation (Or WorldRotation) collision stops working. Before this function is ever called on this component, overlap-detection and hit’s work fine. But as you can see here:
FHitResult* hit = new FHitResult();
this->collisionComponent->AddWorldRotation(procRot, true, hit, ETeleportType::TeleportPhysics);
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::, FString::FromInt(randName) + "SPECIAL OverlapsComp: " + FString::FromInt(ovb.Num()));
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::, FString::FromInt(randName) + "SPECIAL OverlapsActor: " + FString::FromInt(oab.Num()));
I call GetOverlapping… 3 times here. And the first two work fine. But exactly after the AddActorLocal/World… the arrays return only 0…
Is there a certain reason as to why you’re applying to rotation to the collision component itself instead of the parent? Also, if that is intended, can you set the collision component to be visible to be sure it is where you’re expecting it to be? I also only see GetOverlappingComponents/Actors called twice each, not three times, could some code be omitted from your post that you intended to show?
Yes, I deleted some lines more than I wanted to.
The collisionComponent (maybe a misleading name, it’s the procedural mesh component I created) is always visible and also there where it should be.
I added a OnOverlapBegin, and it triggers when I spawn the actor or just simply click into the void (why so ever). Typing SHOW COLLISION in the console however doesn’t show any collision for this PCM (Proc…MeshComp). And once I moved the component, it doesn’t fire any overlap events at all.
I want to create a mesh that covers all child-actors (what it does), so I can use this mesh for sweep, since sweep only works for root-components, but I need to check if the movement on the children triggered a collision also. Maybe there is a simpler solution?
Unfortunately I can’t think of another way to accomplish what you’re attempting to do. Could you provide a project that reproduces this issue? It would be useful to have a reproduction case for this problem.
We haven’t heard from you in a while, . Are you still experiencing this issue? I’m not having any luck reproducing the problem and it would be helpful if you could provide a test project where the issue occurs, as having a reproduction case is the first step to reporting an issue. In the meantime, I’ll be setting this issue to resolved for tracking purposes.