How to implement dynamic socket offset for TPS camera (switching position from left to right)

In this tutorial we will create a dynamic socket offset for the springarm that holds the Third-Person camera on the character. This will make it possible to switch its position from the left side to the right side.

1. Create a new Vector variable inside BP_CharacterBase
Default values: X: 0.0  Y: 45.0  Z: 10.0


2. Open the function called “TPS_CamYawFix”, it’s not broken or anything, I named it like that because it deals with the locking/unlocking rotation of the camera based on if the character has a weapon or not and stuff, but also inside it is the length and offset for the springarm where it switches it. Connect the new variable in both places in that function.


Overview of the entire function to make it easier to locate those two:


3. Now recreate this inside the Blueprint Event Graph



That’s it!