So in my game, I’m having this ball that’s supposed to come flying towards the player whenever they hold down a button, continually adding a force to the ball towards the player as long as the player is holding down the button.
I was able to accomplish this using keyboard controls by just using GetKey, but I have absolutely no idea how to emulate this same effect for a gamepad controller. There are different options as to how the button on the controller should be interacted with, such as hold, tap, and press, but the problem for all of these is that it only applies the force to the ball once, no matter how long the player holds down the button, instead of continually adding that same force again and again while the player is holding the button down.
Is there any way to solve this?