Version: 2017.1
public Vector3 velocity ;

説明

Rigidbody の速度ベクトル

ほとんどの場合、非現実的な挙動になるため速度を直接修正するべきではありません。 オブジェクトの速度を物理ステップごとに設定しないでください。これは非現実的な物理シミュレーションに繋がります。 速度を変更する上での典型例は、ファーストパーソン・シューティングでのジャンプ時にあります。即座に速度を変更したいためです。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Rigidbody rb; void Start() { rb = GetComponent<Rigidbody>(); } void FixedUpdate() { if (Input.GetButtonDown("Jump")) rb.velocity = new Vector3(0, 10, 0); } }