It certainly is possible, but it is true that multiple writes to a field is a deceptively tricky thing to do.
You said you wanted something like tank controls, an additive combination of both inputs. I assume then you have two outputs that behave like levers on a WWII tank or the pedals on an excavator. Each controls one side of the drive train, so steering is done by differential drive.
This isn't a particularly complicated scenario, say you have the following setup:
Code: Select all
inputX = your physical x axis
inputY = your physical y axis
axisLeft = the virtual output for left side drive
axisRight = well you get the idea...
So, you'd have to do something like this:
Code: Select all
// renaming here is redundant, but makes it easier to understand (hopefully)
diffDrive = inputX
linearDrive = inputY
axisLeft = max(min(linearDrive - diffDrive, 1), -1)
axisRight = max(min(linearDrive + diffDrive, 1) -1)
That's about all there is to it. Note that the result is clamped between -1 and 1. This is important to avoid going into 'overdrive' if both inputs are being applied at the same time. (think full fwd drive while steering). The clamp will cause the side already driving to just keep driving, and the other side will slow down.
Also note that I assumed that values <0 in diffDrive mean you are applying left input. Change those + and - signs as needed.
This is all pseudocode, ofc, but the rest of it depends on your setup, so that's about as much help as I can offer.
Hope this helps!
Cheers