Implementing jumping in Roll-A-Ball

I’m trying to implement jumping into the Roll-A-Ball tutorial. I’ve wrote something that seems to work most of the time, but sometimes it fails to respond. In particular, going north-west with the ball would not allow the ball to jump.

Here’s the code I’ve wrote:

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour 
{
	public float accelConstant;
	void FixedUpdate()
	{
		float moveHorizontal = Input.GetAxis ("Horizontal");
		float moveVertical = Input.GetAxis ("Vertical");
		float jumpers = 0;
		if(Input.GetKeyDown (KeyCode.Space))
		{
			jumpers = 20.0f;
		}
		Vector3 movement = new Vector3 (moveHorizontal, jumpers, moveVertical);	

		rigidbody.AddForce (movement * accelConstant * Time.deltaTime);

	}
	void OnTriggerEnter(Collider other)
	{
		if (other.gameObject.tag == "PickUp") 
		{
			other.gameObject.SetActive (false);
		}
	}
}

Try removing Time.deltaTime from AddForce, since you’re only adding the jump force on GetKeyDown (instead of every frame with GetKey) multiplying with deltaTime makes the force negligible.

Another tip: Create the movement vector from the horizontal and vertical components, then normalize it, and then add the jump force. If you don’t normalize the movement vector, the player will be able to go faster in diagonal directions. The length of vector (1, 0, 1) is greater than the length of (1, 0, 0), and so on.