(スクリプト)
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Warp2 : MonoBehaviour { private void OnCollisionEnter(Collision collision) { // ベクトルの足し算を使う。 transform.position = transform.position + new Vector3(0, 2, 0); } }
(実行結果)