I'm playing Dark souls 3 on PC (using a a Dualshock 4 controller with DS4Windows) every time I try to “dodge” it goes in a random direction!
Is this supposed to be happening, or is my controller broken?
If you're playing with a DualShock 4 controller or another non-standard controller, and you're using an app like DS4Windows to process its input, be aware that it might cause unexpected input latency and even introduce input message queue delay (when you've pressed the buttons a second ago but they're only now being processed by the game when it's already too late for them). So it might look like you're dodging in unwanted directions and other actions are happening not when you expect.
Consider using x360ce or similar apps instead which substitute the input libraries with remapped keys, and don't introduce any CPU overhead.
I've had this issue with Dark Souls 1/2/3 and some other games where input timing matters. Switching to x360ce input mapping helped solve the issue in my case.
If you press dodge without any directional input, your character will do a backstep.
If you press dodge while moving in any direction (or just quickly pressing towards that direction), you'll do a roll in that direction. Since you're going in random directions it seems like your controller is having issues.
If you're on PC, see if you can get the driver to adjust the dead zones, control stick sensitivity and such. You can also try using the keyboard controls to confirm there isn't some other weird thing messing with your controls.
If you're playing on console, try resetting your controller, usually it has a small pinhole with a reset button somewhere.