FollowItemConfig.cs 443 B

123456789101112131415161718192021222324
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class FollowItemConfig : MonoBehaviour {
  5. public MeshCollider TriggerCol;//外围点的框
  6. public Collider ModelCol;//模型框
  7. void Start () {
  8. }
  9. // Update is called once per frame
  10. void Update () {
  11. }
  12. public Vector3 ClosePoint(Vector3 pos)
  13. {
  14. return this.ModelCol.ClosestPoint(pos);
  15. }
  16. }