GoalBallPlayerMovementV1.Move C# (CSharp) Method

Move() public method

Increases the velocity of the player by the provided values.
public Move ( float Horizontal, float Vertical ) : void
Horizontal float
Vertical float
return void
	public void Move (float Horizontal, float Vertical)
	{
        if (Mathf.Abs(Horizontal) + Mathf.Abs(Vertical) > .1)
        {
            goBack = false;
        }

            if (!horizontalEnabled)
		{
			RB.velocity = (gameObject.transform.up * Vertical * slowSpeed);
		}
		else
		{
			RB.velocity = (gameObject.transform.right * Horizontal * speed) + (gameObject.transform.forward * Vertical * speed);
		}
	}
GoalBallPlayerMovementV1