top of page
Search

Initial movement function callbacks ,

  • Writer: Saman khorram
    Saman khorram
  • Jul 30, 2023
  • 1 min read

Updated: Aug 15, 2023


void AXX::MoveCallBack(const FInputActionValue& Value)
{
	const float DirectionValue = Value.Get<float>();
	FVector Forward = GetActorForwardVector();
	AddMovementInput(Forward, DirectionValue);
}

void AXX::MoveSidesCallBack(const FInputActionValue& Value)
{
	const float DirectionValue = Value.Get<float>();
	FVector Forward = GetActorRightVector();
	AddMovementInput(Forward, DirectionValue);
}

void AXX::LookupTurnCallBack(const FInputActionValue& Value)
{
	//for turn using mouse x
	AddControllerPitchInput(Value.Get<FVector2D>().Y);
	//for LookUp using mouse y
	AddControllerYawInput(Value.Get<FVector2D>().X);
}





 
 
 

Comments


© 2019 by Saman Khorram

bottom of page