Search code examples
collision-detectionunreal-engine4

Collision Hit event only fires if the enemy is moving in Unreal?


So I have a pretty simple collision I'm trying to check for and I'm really not sure why it isn't working correctly. I have a VR character pawn with custom hand actors. I simply want to check when the hands hit the enemy. The hand actors each have a mesh and a capsule collision component set to the same settings as my pawn.

I also have the enemy set up to detect collisions with the pawn if they run into it and have no problems there whether the enemy is stationary or moving.

My hands however, only fire off the enemy's hit event if the enemy is moving. If the enemy is stationary no hit events fire for hand collision.

Is there a reason why this would be happening? Any help would be greatly appreciated.


Solution

  • I'm not really sure why my pawn collision works while the enemy is stationary. However, since my enemy is derived from a Character class there are limitations that don't allow for the character to be "pushed" while stationary. I'm assuming there is probably a variable that messes with the collision settings when the character is moving or stationary.

    However, I was able to get it to work just not the way I had envisioned. Instead of looking for the hands in the Hit event I changed it to an Overlap event. Doing it this way was not hard but, also not really the solution I was looking for. However, it works.