The velocity vector of the rigidbody.
function FixedUpdate () { if (Input.GetButtonDown ("Jump")) { rigidbody.velocity = Vector3(0,10,0); } }
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void FixedUpdate() { if (Input.GetButtonDown("Jump")) rigidbody.velocity = new Vector3(0, 10, 0); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def FixedUpdate() as void: if Input.GetButtonDown('Jump'): rigidbody.velocity = Vector3(0, 10, 0)