ControllerColliderHit.moveDirection 移动方向
var moveDirection : Vector3
Description描述
Approximately the direction from the center of the capsule to the point we touch.
从胶囊的中心到接触点的大致方向。
This can be used to find a reasonable direction to apply forces to touched rigidbodies.
这能用于查找合适的方向应用力到接触的刚体。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnControllerColliderHit(ControllerColliderHit hit) {
Debug.Log(hit.moveDirection);
}
}
function OnControllerColliderHit(hit : ControllerColliderHit) {
Debug.Log(hit.moveDirection);
}
最后修改:2010年12月23日 Thursday 19:50