Aliging the camera to the capsule collision

Hi there,
I’m trying to create locomotion for the character class and my solution is before adding movement to the pawn, change the pawn location to the camera location and then apply the negative of whatever offset the camera has so that the camera location in the world does not change.

The logic is nothing fancy it just sets the world location of the actor to the camera world location and then the position of the camera is set to the pawn zero by using the “Reset position and orientation”. This works as intended but the rest position and orientation node introduce a jumping movement which is very annoying and I am trying to get rid of.

I tried a couple of solutions but none of them worked for example I tried to disable the “Lock to HMD” in the camera before setting the camera location manually and resetting the position and then enabling the lock to HMD again.

Any help is appreciated.
Thanks