Help us understand the problem. What is going on with this article?

Unity覚書

More than 5 years have passed since last update.

UNITY - Developer - はじめての Unity - 第1回 世界の「骨格」をつくろう
こちらのサンプルを参考にUnityを勉強中。
はじめたばかりなので本当に初歩。

rigidbody.AddForce

このクラスでオブジェクトに 初速をあたえたりできるらしい。
たとえば

sample.js
var fltSpeed = 20.0;
function Start () 
{
    rigidbody.AddForce(
        /* オブジェクト正面方向 + オブジェクト右方向 × 初速 */
        (transform.forward + transform.right) * fltSpeed,
        /* 質量を無視して速度をあたえる */
        ForceMode.VelocityChange
    );  
}

これで、このスクリプトを実行されるオブジェクトは右斜め前方に初速度20で質量を無視して進む…のか?
試してみる。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした