This seems to be a recurring topic/request among those starting to build VR experiences with UE4, so I thought it would be useful to make a short step-by-step tutorial covering it.
The tutorial includes two: 1. Direction of locomotion following the HMD orientation, 2. Direction of locomotion independent from the HMD orientation.
Both variations have a rotation option (left thumbstick) and the movement is constrained to an horizontal plane so there is no risk to go through the floor or fly off. There is also a collision capsule added to the pawn to prevent it going through walls and other objects.
NOTE: To keep it simple, this implementation is for a seated/in-place experience. Rotations will be inaccurate if you use it for a room-scale experience and start moving around IRL. This can be fixed implementing a roto-translation of the VR origin so the camera parented to it pivots around its vertical axis as expected. I may cover this in a future tutorial if anyone is interested.