Input.GetAxisRaw... Only fires semi auto, I need full auto

I have been trying to get Input.GetAxisRaw to have my character move when the D pad is pushed forward. The problem is that the character only moves forward slightly and then stops. It moves a little with each push of the button, but if I hold it down the character only goes forward in very slow and small steps. Here is my code:

Update(no other conditions):

//If the player pushed the move forward button:
if((Input.GetKey ("d") || Input.GetAxisRaw("MoveHorz")> 0.0)  grounded == true)
{MoveForward();}

The MoveHorz input is defined as "joystick axis, 6th axis(Joysticks), Get motion from all joysticks.

BTW, using Input.GetKey(“d”) works fine and I ruled out grounded, it is true the entire test.

Uh… help!

Maybe I didn’t explain my problem clearly.

I am trying to use:

if(Input.GetAxisRaw("MoveHorz")> 0.0) {MoveForward();}

But MoveForward only fires slowly like there was a timer on it only allowing it to fire briefly every second. So the forward movement of my character stutters forward instead of moving forward smoothly.

I believe I am using the condition GetAxisRaw wrong, any help?

Hello Khyrid,

You said that the "Input.GetKey (“d”) " worked fine for firing MoveForward. Check other parts of your code and see is “Input.GetKey (“d”)” is used anywhere else besides the initial code to execute movement. There may be something with gravity and physics that is affecting the MoveForward function.

Best Regards,
The Khyrid

It turns out that I had this tiny block of code:

//Maintain correct velocity:
if(!Input.GetKey ("d")  !Input.GetKey ("a")  !Input.GetKey ("w")  !Input.GetKey ("s")) 
{getParent.rigidbody.velocity = Vector3(0,0,0); moveSpeed = 0;}
}//End Function MaintainPhysics

I needed to add this to the condition: Input.GetAxisRaw("MoveHorz") == 0

The gravity never let up off the character until this fired.

Thanks Khyrid, you’re the only one I can count on sometimes!