Accessing Default Components From a Blueprint

Hey, I’ve been wanting to create an ammo box for my mega challenge, and for that I would need to use OnComponentHit. The problem is that when I wanted to access the CapsuleComponent (which was created automatically whenever you create a character class) of my ShooterCharacter so as to call OnComponentHit (CapsuleComponent->OnComponentHit), I couldn’t access the component as it isn’t written in c++. Creating another defaultsubobject seems to be a bad choice, so I would like to ask if there is any other way to access the component?

A getter is provided

ACharacter::GetCapsuleComponent | Unreal Engine Documentation

Many thanks.

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

Privacy & Terms