How to make projectile hit SkeletalMeshComponent and not CapsuleComponent for Character

Gnometech
Sun, 14 Sep 2014 18:09:53 +0000
Character & Animation

I’ve searched and read everything I could but I’ve not been able to find a solution to this. Anytime it has come up, it appears that no solution exists.

What I have is a Blueprint derived from the Character class. I only have the standard components: CharacterMovement, [Root] CapsuleComponent, ArrowComponent, and SkeletalMeshComponent. Everything works great for this character. They collide with static geometry, they animate as intended, the use the navigation system to get around, etc. They are a NPC in my game.

I also have my player that can fire a projectile. Right now this projectile is just a small sphere with a ball as a mesh. This all works as intended: the projectile fires into the scene and hits things. I receive Hit events as expected, and all is well.

However, when it comes to my NPC, the projectile nearly always hits the NPC’s CapsuleComponent (as determined by the projectile’s “Event Hit” event graph). Sometimes I manage to hit the SkeletalMeshComponent, but this is only when the NPC’s bones animate outside of the CapsuleComponent’s bounds (such as the arms sticking out to the side). So it seems that I have everything in my SkeletalMeshComponent set up correctly to trigger a hit with my projectile.

What I would like to have happen is for the projectile to never hit the NPC’s CapsuleComponent, and always only hit the SkeletalMeshComponent. This seems like a common task, such as determining if I’ve hit the NPC’s head for a headshot, etc.

To set this up, I have my projectile object (just derived from Actor) with its CollisionComponent set with the Projectile collision presets. For the NPC, their CapsuleComponent is set with the Pawn collision presets except that I’ve set the Projectile collision response to ignore. The NPC’s SkeletalMeshComponent is set with the CharacterMesh collision presets.

Please help? This is with 4.4.2. Thanks!

4 posts - 1 participant