Quantcast
Channel: C#タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9703

Unity オブジェクトの移動

$
0
0

Unity オブジェクトの移動

オブジェクトを上方向に移動させる際の手順をメモ。
オブジェクトは取得できている事が前提。

オブジェクトを上方向に移動させる。

test
voidUpdate(){// オブジェクトのtransform情報を取得TransformobjTransform=hogeObject.transform;// その中からposition情報を取得Vector3pos=objTransform.position;// 上方向成分を加算pos.y+=0.001f;// 反映objTransform.position=pos;}

Viewing all articles
Browse latest Browse all 9703

Trending Articles