So i’m making a mecanum base with my team and i’m trying to do a diagonal angle like when the left controller is going in the top left angle it would make the base go into diagonal in that angle
You are telling each motor to do two things. The statements where you are summing three vectors per motor are (likely) correct. The other statements are not needed.
If it turns or strafes oddly after commenting/deleting the unneeded lines, check the signs in your controller signal statements, and/or the reversal of motors in their definitions.
This is because the joystick values at diagonal add up to 180 because it is 90 from each side. The motors can only read up to 100. (I am talking in percents).
So you will need to do 100/180 to find what it needs to be scaled by.
I am not going to give you a straight-up answer, even though I have found it. I will help you work through it though.
yes, but I can pivot while strafing while moving forwards. It is a very complex movement, but it is fun. I can walk you through the pivoting if you want me too, but it is the same concept, just add or subtract the value depending on the motor setup.
kinda, the technical term is pivot, turn is a gradual movement where you drive forwards or reverse while turning. Pivot is turning in a single spot, or during movement. But they are very alike yes.