Use the behavior pin on the player. Then you need to go into the barrels animations and create an image point where you want the origin of the player to be. Then use this code.
On start of layout --> (player) pin pin to object (barrel) image point (x)
This will make your player stay with barrel as well as rotate with it instead of sliding.