Camera swapping does not work

Hello everyone!

I have a problem I have been fighting with for many hours.

I am developing an FPS, and I have a problem with the aim camera. I have created a system that allows me to pick up guns and swap between them, and activate its aim camera(every gun has its own camera) and deactivate the FPS camera.

The problem is that when i swap the cameras, the aim one does not work properly, like unreal does not recognise it, becouse i have rotated it and even then unreal shows me the same image with that camera. Everything works when the aim camera is on the main character, but I do not want that becouse different weapons ask for different cams.

Even if I take the aim camera and move it to the Moon, it shows the same, the skull of that guy.

Thanks and I hope that you can help!

How are you swapping cameras within your Blueprint? I have generally used the node “Set View Target With Blend” called on the given Player Controller. Is the issue that the view changes, but it does not update based on the movement of your mouse / controller? There is an option to “Use Pawn Control Rotation” that may need to be ticked if so, but if the camera is on a separate BP from your pawn, you’ll have to forward the control rotations from there to whatever weapon camera is currently active.

First of all thanks for your answer ^^.

About how i am swapping cameras, I uploaded 4 pictures and one of them is the blueprint I use, but in case you cannot see them I am going to explain it. I use the “activate” and “deactivate” functions. The problem relies on the camera that is on the gun, since looks like unreal does not recognise it.

I will try what u explained and then upload another answer.

Thanks!

Blockquote

It looks like you should use the Set View Target with Blend node, instead of just activating and deactivating the camera.

https://wiki.unrealengine.com/Camera_Switching_in_Blueprints

If you want there to be no transition you can just set the blend time to 0.

The activate and deactivate node will likely not change anything in your view, as the Player Controller is not aware that it should switch to an active camera on a separate Blueprint. Use “Set View Target With Blend” instead.

Thanks a lot!

Thank you I got it to work!