Calling a function from actor component for Enhanced input inside Player Controller

Hey @BoostedCR24!

I think there’s a confusion on inheritance. The protected access specifier allows member functions to be accessed from derived classes. The player controller doesn’t derive from your actor component. For you to be able to access your function from the player controller, you’ll need to adjust your header file (the image you shared is a screenshot of the .cpp file, not .h), making sure that the first access specifier above your function declaration is the public access specifier, and not protected.

So @Kemichar is correct, just skipped the explanation.

Hope this helps :innocent:

1 Like