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.
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.