Controls Coding Help

Ok so here are the following problems I’m having, first of all I want the motion to be continuous so I don’t need to hold down on buttons Y and A for them to work, I can just press them once and they keep going till I press B. Second problem is the right stick will only make the motor spin one direction when it should spin two depending on the postion of the right stick (Up and Down).

You don’t need to check for the controller1.position sign, just send the motor forward and let the set velocity deal with direction.

1 Like

Thanks a million, do you have any how to fix the first problem?

Welcome to the forum!

You might want to have a variable that tracks its current setting and alters it according to button presses. Here’s a possible fix.

Hope this helps!

Thanks! Doesn’t seem to work with the right stick controls but I’m working on a fix lol.

Yeah this only covers the first part of the program and doesn’t involve the joystick.

I sorted it thanks for the help :slight_smile:

1 Like