Make sphere ignore sword attacks

I needed a sphere collision to detect when Im near to an enemy.
Then an health widget is shown above the enemys head.

The problem is, this sphere is also detected by my sword attacks:

The sphere collision for the widget is very big, so my sword attacks have a very large range now. But I want the sword only to deal damage when it hits the enemy in the range of the capsule component of the enemy.

How can i do this?

If your sword is a component of your player (not an actor attached to the player) you may want to add another cast, from onCOmponentBeginOverlap->otherComponent you should cast to capsuleComponent, so it will trigger only when enters a capsule component of your character. (Don’t remove the cast to ThirdPersonCharacter, just add the cast after it)

Yes its added as a component. I don’t quite understand how you mean that. It would be very nice if you could show a screenshot or something similar. Thanks in advance.


I’m spanish, so the node is in spanish, but it still the begin overlapp. But this should work

1 Like