Rigidbody

Rigidbodyに力を加える

void FixedUpdate()
{
  Vector3 force = new Vector3 (
    0.1f,
    0.2f,
    0.3f
  );
  transform.GetComponent<Rigidbody>().AddForce(
    force,
    ForceMode.VelocityChange
  );
}

Rigidbodyに回転の力を加える

AddTorque で回転の力を加える事ができます。

void FixedUpdate()
{
  Vector3 force = new Vector3 (
    0.1f,
    0.2f,
    0.3f
  );
  transform.GetComponent<Rigidbody>().AddTorque(
    force,
    ForceMode.Force
  );
}

ForceModeについて

名前概要
Force質量を使用して、リジッドボディへ継続的な力を加えます。
Accelerationその質量を無視して、リジッドボディへ継続的な加速を追加します。
Impulseその質量を使用し、リジッドボディにインスタントフォースインパルスを追加します。
VelocityChange質量を無視して、リジッドボディにインスタント速度変化を追加します。