how to go about scripting object movement with hingejoint2d
i have two pinball style flippers (i named them bumpers) both with hingejoint 2d and they are connected to the foreground layer in a fashion that would make sense. ive been reading alot on other pinball projects, most of the stuff i could find was 3d and the stuff i could find on utilizing hingejoint2d was all ropes and platforms, although informative, none of this really shed much light on what im trying to accomplish. ive got my rigidbody2ds and i think ive set the rotational boundaries correctly.
i want to utilize the unity input manager on this project instead of setting keys values in script, so it wouldnt be rotate up or down on key up or down like i typed up in the photo. i was thinking of utilizing the left and right arrow keys as positive and negative possibly under fire 1 and fire 2 but im confused as there seems to be two of them in the list. i think itd be sweet for the bumpers to be controlled by the r2 l2 triggers on a controller also
as far as scripting goes, i can move an object left or right and even make it jump but when it comes to rotation and hingejoint2d i have no clue how to pull this off. i tried to copy, paste and tailor code that seemed like it would work but i got no response, more than likely because i am over looking one of several factors. but hey im just diving in and hoping to learn how this all works. id really appreciate some help in breaking down what i need to do to get this thing working, even if its just links, as long as its extremely relevant lol thanks for reading!