Anyone else reading this likely won't know what h and v are and may not read the linked unityanswer, but that is irrelevant to the problem thankfully and they should still spot the problem easily.
Your problem is simple. You are reassigning the variable instead of adding to its existing value.
moveDirection = h * wallTransform.right;
moveDirection = v * wallTransform.up;
will set moveDirection to `v * wallTransform.up;`
In order to make the values add to one another, you should change it to
moveDirection += v * wallTransform.up;
Also, you don't need the `if(Vector3.Dot(Camera.main.transform.forward, transform.forward) < 0)` for the vertical movement. Unless your camera can rotate such that it is upside down (beware of gimbal lock if it can), down will always be down, and otherwise the code is wrong in that instance as it should be `if(Vector3.Dot(Camera.main.transform.up, transform.up) < 0)`.
So your code should look like:
// Wall Movement controls
if (onWall && wallTransform)
{
// Lock camera for short period when transitioning moving & standing still
lockCameraTimer += Time.deltaTime;
if (isMoving != wasMoving)
lockCameraTimer = 0.0;
//If the camera is behind/beside, right is right. Otherwise, right is left.
if(Vector3.Dot(Camera.main.transform.forward, transform.forward) < 0)
moveDirection = h * wallTransform.right;
else
moveDirection = h * -wallTransform.right;
moveDirection += v * wallTransform.up;
}
Also, I recommend that when wall-climbing, you lock the camera in your camera script to be behind the character at all times. It depends on your script, but one easy way is to do the same check as above before moving your camera:
if(Vector3.Dot(target.transform.forward, transform.forward) < 0)
//move the camera however you are moving your camera
else
//stop the camera at the closest position/angle behind/beside your target