top of page
Search
Writer's pictureSaman khorram

Initial movement function callbacks ,

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);
}





2 views0 comments

Recent Posts

See All

Comments


bottom of page