コントローラーにヒットしたゲームオブジェクト
// Objects we touch, move them to position (0, 0, 0) function OnControllerColliderHit(hit : ControllerColliderHit) { hit.gameObject.transform.position = Vector3.zero; }
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void OnControllerColliderHit(ControllerColliderHit hit) { hit.gameObject.transform.position = Vector3.zero; } }