Not sure how you want it to work. There’s not enough details in the description. Generally speaking, it is a matter of setting up vectors:
You probably have a good understanding of what you need but I know nothing about it.
DOF - degrees of freedom allows you to move in all directions (by default) but you can use constrains. You can also use specific forward / right vectors like in the original example. Or transform them from world.
We don’t know if you only want to move diagonally, for example.