0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

unity5.2の作法

Last updated at Posted at 2019-02-20

概要

unity5.2の作法、調べてみた。

sceneを作る

file-new scene

cameraとlightが出来る。

3dオブジェクトを配置

gameobject-3dobject-sphele

球ができる。

位置を変更

transform-xを-10にする。

重力を効かせる

addcomponent-physics-rigidbody

ゲームを起動

三角ボタンを押す。

ゲームを停止

三角ボタンを押す。

床を設置

gameobject-3dobject-plane

広げる

scale -x,y,zを10,10,10にする。

名前をつける

sphereをtamaにする。

スクリプトを書く

assets-create-c#script
tamaにする。

using System.Collections;

public class tama : MonoBehaviour 
{
	void Start()
    {
	    Rigidbody rigid;
        Vector3 d = new Vector3(10, 10, 0);
        rigid = this.GetComponent<Rigidbody>();
        rigid.AddForce(d, ForceMode.Impulse);
	}
	void Update() 
    {
	
	}
}

スクリプトを適用する。

addcomponent-scripts-tama

gif化した。

20190220_132215.gif

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?