2011-07-21から1日間の記事一覧

カラーバランスの調整は RGBレイヤーにのみ有効

GIMPで脱色しようとしたら上記のようなエラー。 画像>モード>RGBにすればOK.

ragdoll ラグドール

骨付きのモデルが必要→フリーであります http://u3d.as/content/mixamo/zombie-character-pack/1sK http://d.hatena.ne.jp/gumilab/20110426/1303798974

make a block wall with code コードで多数のブロックから成る壁を生成

function Start () { for (var y = 0; y < 5; y++) { for (var x = 0; x < 5; x++) { var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.AddComponent(Rigidbody); cube.transform.position = Vector3 (x, y, 0); } } } //add it to GameObj…

mouse touch object マウスでオブジェクトに触れたことを検知

function OnMouseEnter () { renderer.material.color = Color.red; } //attach this script to cube or so.

子供を全部移動

// Moves all transform children 10 units upwards! for (var child : Transform in transform) { child.Translate(0, 10, 0); } //他オブジェクトとのやり取り //http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Ob…

タグ追加

Tagsを展開してElementに書く。

occlusion culling static オクルージョンカリング

ビルなど、動かないものはStaticにチェックしておくと オクルージョンカリングによりパフォーマンスが上がるhttp://unity3d.com/support/documentation/Components/class-GameObject.html

オブジェクト同士のやり取り

GetComponent / SendMessage