Hello
I am making a first person character class from scratch so I can learn the engine better. I am trying to change the air control of the character, but I can’t seem to change it. First I found out that I can change the air control with CharacterMovement->AirControl
but I am told by VS that it’s private and I cannot access it. So I try to store it as a variable by doing UCharacterMovment* ucmc = GetCharacterMovement();' and then changing it by doing
ucmc->AirControl`, but I am now told that “pointer to incomplete class type is not allowed”
Please help!
“pointer to incomplete class type is not allowed” means you need to include the class up top:
#include "GameFramework/CharacterMovementComponent.h"
AirControl is a public parameter also. so this is enough: (do it in the character constructor)
GetCharacterMovement()->AirControl = 1.0f;
AirControl expects a value from 0.0f to 1.0f.
Works fine now, thanks!