To prevent negative vales and movement take @yobuddy's advice and use SimTools v2.4, then allocate a '0' for the min value in Sway and Roll.
This basically turns off the negative inputs for this DOF
We should be able to do this without modified plugins like this.
First Game Engine needs to be in "Expert" mode, this gives us separate Min/Max files for both (a) and (b) Axis Assignments.
Then setup you axis assignments like this.
Notice this is the - (a) Axis Assignments.
Notice this is the - (b) Axis Assignments.
Then in Tuning Center, make sure both sets of Min/Max settings for (a) & (b) Axis assignments are the same, except for sway.
For (a) Axis Assignment use a sway like this.
And for (b) Axis Assignments use a sway like this.
What you have essentially done here is turn off sway in one direction for each axis (the 0 turns them off in that direction.)
Now all you have to do is change your interface output.
Wherever you are using <Axis2a> Change it to <Axis2b>.
With this example above, all game plugins should be usable without modification.
If anything in the example needs more explaining, let me know!
►in your code:
I can't do -ve DOF so I have this line that clips anything 0-127 and 128 is minimum
if (actuatorPosition[currentActuator]<128) actuatorPosition[currentActuator]=128;
So now the values are 128-255 and these are mapped to the values which go to the servo as per below. These numbers vary servo by servo and with ASMC/E you even need to tweak for individual servos depending on how the tiny pots might have been adjusted for sensitivity.