(edited by Bri.8354)
Melee in PvE
Go beastmaster and make sure that your pet is as nasty as they come with traits. Your pets should be close combat variants. One for high single target damage (jaguar, lynx, or the canines for the knockdowns). One is for tanking and group combat (river drake or murellow).
You can do two different weapon variants. I usually do 2 different weapon combos:
1: greatsword/shortbow. This gives a lot of tanking ability. The greatsword gives good survivability, and when you need to kite (usually vets or champs), the shortbow gives you decent auto attack that can stack bleeding.
2: Sword+warhorn/axe+torch. This gives high damage and is really good for handling veterans and champions, as the longer the fight goes, the more might you will stack on your pet. When you need to kite (usually groups) the axe hits a lot of people, and the torch gives you more attrition burning. I usually don’t have room for the fire trap here, since I love the sword and QZ.
A few general things:
Always use healing spring. It is brilliant. Either with your missile weapon, or by doing leaps in it.
Bring at least one field (cold or fire trap are my favorites). Don’t use your leap attacks to close gaps, use them for healing or fire and frost armor. Both cats and dogs have leaps as well, so with both of you sporting those auras the damage adds up quick.
There are many viable builds of course, but I always had the most fun just running in and cutting things up, and the ranger is surprisingly good at it. Not the highest damage, but mobs don’t kite pets, and if you are in close combat as well, the damage racks up fast.
I find this build a lot more effective than range builds, a melee build REALLY makes your pet shine!
You have to be more creative for sure to get good dps out of a viable melee build, but as Malin said, beastmastery goes well with melee.
Of course, dps doesn’t have to be the only aim with a melee build. There are some rangers like DaisyRogers who run melee builds that support by being tanky and by buffing/healing allies.