CharacterControllerを使用した場合の当たり判定

プレーヤーをワープさせる
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerWarp : MonoBehaviour {
// このスクリプトは「CharacterController」を追加したオブジェクトにつける(ポイント)
void OnControllerColliderHit(ControllerColliderHit hit){
if (hit.gameObject.tag == "Warp") {
transform.position = new Vector3 (0, 21, 0);
}
}
}




プレーヤーをワープさせる
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerWarp : MonoBehaviour {
// このスクリプトは「CharacterController」を追加したオブジェクトにつける(ポイント)
void OnControllerColliderHit(ControllerColliderHit hit){
if (hit.gameObject.tag == "Warp") {
transform.position = new Vector3 (0, 21, 0);
}
}
}



CharacterControllerを使用した場合の当たり判定