Skip to content

Instantly share code, notes, and snippets.

@pnegri
Created March 27, 2014 11:28
Show Gist options
  • Save pnegri/9805487 to your computer and use it in GitHub Desktop.
Save pnegri/9805487 to your computer and use it in GitHub Desktop.
FName ACharacter::CharacterMovementComponentName(TEXT("CharMoveComp"));
...
ACharacter::ACharacter(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP) {
...
CharacterMovement = PCIP.CreateDefaultSubobject<UCharacterMovementComponent>(this, ACharacter::Char...);
if (CharacterMovement)
{
CharacterMovement->UpdatedComponent = CapsuleComponent;
CharacterMovement->MaxStepHeight = 45.f;
CrouchedEyeHeight = CharacterMovement->CrouchedHalfHeight * 0.80f;
CharacterMovement->GetNavAgentProperties()->bCanJump = true;
CharacterMovement->GetNavAgentProperties()->bCanWalk = true;
CharacterMovement->SetJumpAllowed(true);
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment