TPC - Attack and React, NPC - Attack and React, SIMULTANEOUSLY?

Your third person character throws a punch, and if the sphere collisions on each of the TPCs hands overlaps the NPCs capsule, there is a reaction. If the NPC throws a punch, and if the sphere collisions on the NPC’s hands overlaps the TPCs capsule, there is a reaction.

But you are close, and an NPC punch causes TPC to react and the react react reaction like a boomerang causes the NPC to be “hit”. And vice versa…

But what does the forum suggest as a way to filter out false alarms? Like just walking through the characters? Or the boomerang situation above?

My current strategy was using booleans in each characters BP. With a boolean like “IsAttacking?” Or “IsPunching” being set to true before the punch animation plays and false after.

Then adding this boolean (AND boolean) to overlap checks for the fist sphere collisions (OR boolean) VS a capsule. Its ok but there must be a better way to do this. Any ideas? Thanks!

what result are you looking for?

you can use anim notifies to be a bit more accurate on hits, could also maybe add a slight knockback so if one hits first the other cant?

1 Like

Hey, I was trying to make the detection more selective, discerning a kick from a punch and so on, so that when the TPC walks through the NPC’s capsule I don’t get false hits.

In theory that is what should happen, you set it up so the NPC can’t attack whilst they are being hit and vice versa with the TPC, but it doesn’t seem to always work, at least for me.

yep so use an anim notify so the collision is only active when a punch should hit, or for testing just look at the playback time and add a delay so for example
at .3 secs in the punch is active and then 0.2 sec later its inactive again

1 Like

Ok will try that. Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.