I’ve been trying for days, and am not going to figure this out on my own. Collision works fine when either of my pawns collides with a static actor, but the OnHitComponent (Capsule) event is not activated when the capsules of my two pawns collide.
The event does get activated if the capsule’s simulate physics is enables, but then the capsule falls to the ground, or is bumped away from the pawn.
I move both pawns with AddRelativeLocation in C++. Setting sweep to true doesn’t help. Tried to work with overlap events, no luck. Pawn collision preset yields the same problems.
Here are the class hierarchies for my 2 pawn classes.
And both capsules’ settings (they are the same):
Additional information: my Pawns also ignore the ‘Default Pawn’ object (OnHitComponent event doesn’t get called), from the Modes->Place subtab.
The Capsule doesn’t seem to be the problem. I tried using the skeletal meshes as collision generators instead. Same problem: pawns hit static meshes, but ignore other pawns.
I’ve isolated the problem a bit more. It seems to matter what parent the BP class of the colliding pawns have.
If both pawns have c++ classes as a parent, the hit event doesn’t get triggered.
But if one of the pawns has only pawn as parent, no c++ class in between, then it does work and the hit event triggers.
Otherwise the classes are the same (I used the reparent function).
Seems like a bug in ue to me…