How do you stop the FPS rotation?

Hey, i have some trouble with the c++ FPS template. I want to be able to stop the rotation of the camera during certain times, but i’m not sure how to do this. I can’t find anything that will let me stop the rotation from happening when the player moves the mouse around. Do anyone know how you could go about this? Also is there a way you can set the players rotation instantly in some way, like making the character instantly rotate to a object in the world?

Thanks.

Not 100% sure of the setup, but the mouse is usually based on rotation on the Yaw axis. Try searching for the function:

AddControllerYawInput();

The function is usually linked to some input taken from the DefaultInput.ini file.

InputComponent->BindAxis("Turn", this, &APawn::AddControllerYawInput);

I managed to figure out what you can do in order to block so that the player wont look around when the player moves the mouse.
You can use this piece of code to stop the input.

Cast<APlayerController>(Controller)->SetIgnoreLookInput(true);