ControllerColliderHit.normal 法线

var normal : Vector3

Description描述

The normal of the surface we collided with in world space

在世界坐标空间碰撞表面的法线。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnControllerColliderHit(ControllerColliderHit hit) {
		Debug.Log("Normal vector we collided at: " + hit.normal);
	}
}
// print the point's normal we impacted
//打印碰撞点的法线
function OnControllerColliderHit(hit : ControllerColliderHit) {
	Debug.Log("Normal vector we collided at: " + hit.normal);
}
Page last updated: 2010-12-23