can someone tell me what this line of code does, Super::SetupPlayerInputComponent(InputComponent);,Can Someone tell me what this line of code does,

I am trying to use UE4 and I don’t know what this does (Super::SetupPlayerInputComponent(InputComponent):wink:
I am trying to set up player inputs for moving but I need to understand the code first. Can Someone please help me.,

Super is used like that when you override a function in a child class but want to make sure all the parent class commands also get run in the same function.

If you have stumbled on this line of code and are wondering what it does then look in the header and you should see:

virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;

This means that the class you are deriving from (Lets say APawn) has a virtual function with this same name. It allows you to override this function in your Pawn and change the behavior.

If the base Pawn class were doing something special in this function and you override it without calling super then you would miss out on all the parent pawn were doing.

I assume you are familar with C++ classes, virtual functions, vtables. Otherwise check these basics not being specific to UE4.

“Super” is used in UE4 as a generic definition for the name of the base class, the current class is derived from. Thats an approach been copied from java.

With “Super” you can do following:

BaseClassName::function( paramters... ); // addressing base class function absolutely

Substitude this with a more generic expression, (Super = BaseClassName) :

class MyDerivedClass : BaseClassName
{
  typedef BaseClassName Super; // always added by UE4 framework
  virtual function( parameters... ) override;
};

MyDerivedClass::function( parameters... )
{
    // thats how to be used in C++ native syntax
    // BaseClassName::function( paramters... ); // addressing base class function absolutely

    Super::function( parameters... ); // addressing the base class function in a generic way
}

Both variants doing absolutely the same, but using Super is simplifing the UE4 generic build stuff a lot.

child and parent are terms of compositions. thats something very different.
In C++ there are used the expression base class and derived class in the context of virtual functions.

Yeah, I may have had a few terms messed up. Like you said, by parent I meant base class, and child I meant derived class.