Caracter movement follow camera mouvement

hi,

I started a project with the c++ ball game template .

I make a camera like a TPS game, but in a TPS game is you move the camera, " the forward " will change. You can move your caractere only with forward button and the mouse .

i try to do some for my ball with c++ . ( i am beginer in UE4 )

my try :

void ABallBall::MoveForward(float Val)
{
	
		// find out which way is forward
		const FRotator Rotation = Controller->GetControlRotation();
		const FRotator YawRotation(0, Rotation.Yaw, 0);

		const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X) * FVector(0.f, Val * RollTorque, 0.f);

	Ball->AddTorque(Direction );	
}

Thanks

This Work :

void ABallBall::MoveForward(float Val)
{
		// find out which way is forward
		const FRotator Rotation = Controller->GetControlRotation();
		const FRotator YawRotation(0, Rotation.Yaw, 0);

		// fVector mouvement 
		const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);
		Ball->AddTorque(Direction * Val * RollTorque );
}