Hello everyone.I’m trying to create an Uncharted 4 camera zoom in/out blueprint mechanism.i want to press right click to zoom in and as long as I hold down the right click then be able to press the spacebar to switch sides right and left again and again with one press.just like Uncharted 4 aiming system in PC game play. ![]()
Hi,
Do you have something implemented already ?
Yes and thank you for your response.this is the zoom mechanism.I want after pressing the right click and as long as I hold it down to be able to press the spacebar and the camera goes right. To press the spacebar again and the camera goes left and again right and again left while I press it, etc.If you’ve played Uncharted 4 in PC, this is exactly the targeting mechanism.
Allright I basically keep your approach and offer you a method.
You can put 2 scene components inside capsule
These are basically a position reference (local position), we will use this to swap left of right location. Simple and easy to change whatever location you want.
Logic is almost the same but couple of things going on.
You press input Aim, we mark the bIsAimingBool and change arm length.
OnTick we change the socket offsets.
First we check and select whichever position should be, CameraLeftPos or RightPos ->GetRelativeLocation
Then after then we also check if we are aiming at that moment, we already have bool. If true we use this vector if not we set zero (or whatever you want).
Then we interpolate(VInterpTo) from current position to target location each tick with speed and save as variable and set it onto CameraBoom SocketOffset.
When you press IA_AimSide if runs a FlipFlop which will be true or false each press and this would define which vector as target should be selected.
Thats pretty much it as a simple version of Uncharted4 aiming at its core.

Further things to do : So when you change location of camera boom, now your reference point of aim is actually changed. You will notice that the point that you are aiming is not the same place anymore. You were aiming to enemies head but on swap its not head anymore.
In order to change that you have to introduce a new system. A targeting system. What location is the player currently targeting? If you maka a trace and get location you are targeting, you can compansate this rotation to camera. Thaata time using target offset would be better than socket offset in terms of player comfort and accuracy.
So about targeting the below should be a starting point.
So when we swap location of camera, we check (trace) which point is the player is looking.
If its hit to a point, we make a loop and compansate this angle by “find look at location” untill the camera left right location change ended. When they are almost same we can let go interrupting camera rotation.
This is quite important in 3rd person shooters, while you make the camera change position. Additionally you can shoot or sometimes cannot shoot with this position changes which is further steps to tackle.
Let me know if it helps.







