====== 070 動く足場の作成 ====== ===== 概要 ===== 上下運動はSin波で実装してGameObjectにアタッチします。 ==== ソースコード ==== using UnityEngine; using System.Collections; public class MoveObject : MonoBehaviour { void Update() { // 上下移動。 float sin = Mathf.Sin( Time.time ); transform.Translate( Vector2.up * sin * Time.deltaTime ); } }