Stationary player pawn collision not firing

Hello, I’ve been scouring around the forums trying to figure out a way around this issue to no avail. It seems a few others have similar issues, but the responses are varied and with no concrete answers.

I have attached a project here that demonstrates the issue: http://www.imailds.com/upload/CollisionProblem.zip

The game should be run with two players. Pressing LMB will fire a slow moving projectile fowards. There are print functions that should report collisions when the projectile hits something.

If the player is stationary, no hit event is recorded and the projectile penetrates through the player.

If the player runs around, the hit is recorded, and the player is ejected from the projectile space.

Some answers go some way to explaining WHY this might be happening, but stop well short of providing any type of solution. If this sample app I’ve linked to is not the correct way of going about this, could someone please explain HOW you would go about implementing this type of system for something like a rocket projectile.

For completeness, I have ended up with this problem due to actor overlap not working on fast moving projectiles, which I presume is due to them being location tested, rather than sweep tested on movement which has taken me
into the space of trying to use collisions for this requirement.

Finally, if there is a way to get this working, is there also a way to tell the projectile to ignore its instigator? Obviously I can set ignores on specific channels, but all players would be the same channel, and that won’t allow projectiles to be ignored by the player that fires them which, in my case, I need to implement.

Thanks, Josh

CCD - Continuous Collision Detection. this solves the high speed collision problem. it takes more CPU, but effectively detects if it was supposed to hit something rather than ticking over it.

Also, if you move the object by changing its transform, you will have issues, the hit/collisions are best dealt with as pure physics objects.

eg, if the player isn’t moving, and the object is just having its transform changed, it’ll happily travel THROUGH the player and not trigger a hit because the object went from being outside the border of the player object, to being inside the object.
when the player is moving, and they run into the moving object, it blocks them because they hit it the object, not the other way around, as the standard player pawns are a capsule moved by physics forces(kind of)

however, if the projectile was a physics object and had a force applied and it was flying towards the player with CCD enabled, regardless of speed it will trigger a hit/Collision.

1 option: use a Projectile movement component on your object to implement physics movement, and disable your transform.

If you want to keep things the way they are, you need to look at triggering based on Overlap instead, as that will trigger if you overlap another object(eg if you want to move the object by changing its transform)

The sample app I provided answers some of the things you’ve raised.

  • I am using a projectile movement component.
  • I am not using transforms

Based on your comments, I have checked the sphere in the test app and changed it to simulate physics. This seems to partially resolve the issue, as the projectile is now bouncing off the player, but now the ProjectileMovement doesn’t do anything? Ultimately though, I want the projectile to penetrate the player, informing me that this has happened without stopping its trajectory.

CCD does not solve the problem that has brought me to this point. I have been using overlap on slower projectiles, but I now have a high speed projectile to implement and it has tunelling issues because of CCD not making a difference.