Source/BattleRoyale/core/Character/CharacterBase.cpp
//////////////////////////////////////////////////////////////////////////
// Input
// Let the input binding that refer to the character specific into the character itself.
// we can bind more other kind of binding in the Playercontroller.
Input
Let the input binding that refer to the character specific into the character itself.
we can bind more other kind of binding in the Playercontroller.
Input Let the input binding that refer to the character specific into the character itself . we can bind more other kind of binding in the Playercontroller .
void ACharacterBase::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent)
{
	check(PlayerInputComponent);
	PlayerInputComponent->BindAction("ResetVR", IE_Pressed, this, &ACharacterBase::OnResetVR);
	PlayerInputComponent->BindAxis("MoveForward", this, &ACharacterBase::MoveForward);
	PlayerInputComponent->BindAxis("MoveRight", this, &ACharacterBase::MoveRight);
	PlayerInputComponent->BindAxis("Turn", this, &APawn::AddControllerYawInput);
	PlayerInputComponent->BindAxis("TurnRate", this, &ACharacterBase::TurnAtRate);
	PlayerInputComponent->BindAxis("LookUp", this, &ACharacterBase::AddControllerPitchInput);
	PlayerInputComponent->BindAxis("LookUpRate", this, &ACharacterBase::LookUpAtRate);
	BindAbilityActivationToInputComponent();
}
void ACharacterBase :: SetupPlayerInputComponent ( class UInputComponent * PlayerInputComponent ) { check ( PlayerInputComponent ) ; PlayerInputComponent -> BindAction ( " " , IE_Pressed , this , & ACharacterBase :: OnResetVR ) ; PlayerInputComponent -> BindAxis ( " " , this , & ACharacterBase :: MoveForward ) ; PlayerInputComponent -> BindAxis ( " " , this , & ACharacterBase :: MoveRight ) ; PlayerInputComponent -> BindAxis ( " " , this , & APawn :: AddControllerYawInput ) ; PlayerInputComponent -> BindAxis ( " " , this , & ACharacterBase :: TurnAtRate ) ; PlayerInputComponent -> BindAxis ( " " , this , & ACharacterBase :: AddControllerPitchInput ) ; PlayerInputComponent -> BindAxis ( " " , this , & ACharacterBase :: LookUpAtRate ) ; BindAbilityActivationToInputComponent ( ) ; }
Input
Let the input binding that refer to the character specific into the character itself.
Input Let the input binding that refer to the character specific into the character itself .
// set up gameplay key bindings // Bind fire event //PlayerInputComponent->BindAction("Fire", IE_Pressed, this, &ACharacterBase::OnFire); // Bind movement events // We have 2 versions of the rotation bindings to handle different kinds of devices differently // "turn" handles devices that provide an absolute delta, such as a mouse. // "turnrate" is for devices that we choose to treat as a rate of change, such as an analog joystick