Is playercontroller file == playercharacter file?

hey sorry for the delay - and you are right!
indeed it seems that “playercharacter” is a created c++ file that derives from the character class. That is common way to do it for your “player” and/ or ais. All characterclass functions, vars and components can be then accessed from your new playercharacter script and when you create it - you can of course name it like you want. Origninally below characterclass lies the pawn class - that is often used if you dont want to use the built-in functionality of the character class or for simpler pawns scripts like simple ais.

so if you want to create such script:

  • in c++ folder in Editor → create new c++ class → choose that it is ob base “character” and click ok
    for the player controller: it is already having a controller → in header of that class it has: include “GameFramework/Controller.h”
    for any pawn or character class you can set a controller - either via your GameMode or in the detailspanel of the your derived characterscript when you create a BP that derives from your made characterclass.

in general you can see in the .h file from which class or component your script inheritates:

  • go to the header file “yourcharacter.h” → below the “include blabla” section comes the initialisation of class type etc… there stands something like:
    -class YOURPROJECTNAME_API Yourcharcter : public ACharacter

and ACharacter is the class your palyercharacter.h is made of

1 Like