Self Answering Question: How do I use AddForce on an APawn?

Disclaimer: This is mostly a self-made question and answer post, similar to a community wiki post on StackOverflow.

Question: How do I use AddForce() in an APawn?

  1. Need this in the constructor:

    AMyPawn::AMyPawn(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass< UMovementComponent >(TEXT(“Movement”)))

  2. Make sure that SetSimulatePhysics flag is set to TRUE in both the class object (called either in BeginPlay() or in the constructor) and in the UE4 Editor (Properties/Details when you click on a (UBoxComponent, USphereComponent, UCapsuleComponent, etc. collider volumnes).

  3. Use AddForce(FVector Force of any vector) in your Tick(float Delta) override function.

Couldn’t you have used ACharacter instead of APawn?