ControllerColliderHit.transform 变换

var transform : Transform

Description描述

The transform that was hit by the controller.

控制器碰到的变换(transform)。

using UnityEngine;

using System.Collections;



public class example : MonoBehaviour {

	void OnControllerColliderHit(ControllerColliderHit hit) {

		Debug.Log("I'm colliding with: " + hit.transform.name);

	}

}
// print the transform's name that collided with this transform

//该变换被碰到,打印transform的名字

function OnControllerColliderHit(hit : ControllerColliderHit) {

	Debug.Log("I'm colliding with: " + hit.transform.name);

}
Page last updated: 2010-12-23