I’m developing a prototype and I wanted for a dynamic mesh to get all overlapping actors, and the collision kinda work, but just for the player, and I have no idea why it’s not working for other components, as an example I have the player and a cube: but just it just identifies the player:
The settings of the dynamic mesh:
And for the cube:
Ones in world dynamic the other in Pawn.
Character is in Character.
What channel is the collision checking for?
For other collision operations I can specify the channel it looking for, but the GetOverlappingActors only allows to pass a optional class filter, so I’m not sure:
TArray<AActor*> OverlappingActors;
DynamicMeshComponent->GetOverlappingActors(OverlappingActors);
GEngine->AddOnScreenDebugMessage(100, 0.0f, FColor::Red, FString::Printf(TEXT("Dynamic Overlapping: %d"), OverlappingActors.Num()));
For extra information, that’s my character collision:
My confusion is that even replicating the settings it doesn’t identify the cube
Ok, so I noticed that moving an actor makes it’s start to get inside the overlapping, but considering that for example the walls I want to check against aren’t going to move, it’s a problem:
Its a reverse sweep then.
Acrually look up and test how sweep collision works - because latest engine, bugs, BS, things may be different.
The premise is, you can detect anything, but the start event is not necessarily going to fire for you.
If you set up the function call right, passing in the correct parameters for it to sweep, then in theory you get responses ditecly off that same function.
Prototype in blueprint to check what is possible.
A good/decent reference can be found in the engine samples, when dealing with the render target textures that make up the fake water.
It should show a good concept basis for checking overlaps, setting an actor variable, doing checks, and clearing that value to repeat the process on overlap end.
In all cases (even c++) you can pass parameters to the func for exactly the channel and settings you want to check.
The problem is that I can’t specify any parameter on the GetOverlappingActors rather than the ClassFilter
Basically I’m trying to check the overlaps for a complex shape or simple convex hull, but it seems like I can’t use the Overlap to check for these two, since the CollisionShape required doesn’t accept a convex hull:
Try OnOverlapBegin with peperly set sweep and channels.