// 水面是否存在实现 public bool GetWaterExists(float x, float z) { x -= CFunction.GetTerrainLeft(); z -= CFunction.GetTerrainTop(); return(InnerGetWaterExists(x, z)); }
// 获得水面基本高度实现 public float GetWaterBaseHeight(float x, float z) { x -= CFunction.GetTerrainLeft(); z -= CFunction.GetTerrainTop(); return(InnerGetWaterBaseHeight(x, z)); }
// 球体范围碰撞实现 public bool TraceSphere(Vector3 _center, float radius) { Vector3 center = _center; center.x -= CFunction.GetTerrainLeft(); center.z -= CFunction.GetTerrainTop(); return(InnerTraceSphere(center, radius)); }
// 碰撞测试是否有阻挡实现 public bool TraceHitted(Vector3 _src, Vector3 _dst) { Vector3 src = _src; Vector3 dst = _dst; src.x -= CFunction.GetTerrainLeft(); src.z -= CFunction.GetTerrainTop(); dst.x -= CFunction.GetTerrainLeft(); dst.z -= CFunction.GetTerrainTop(); return(InnerTraceHitted(src, dst)); }
public bool TraceDetail(Vector3 _src, Vector3 _dst, ref RaycastHit[] hits, ref int hit_count) { Vector3 src = _src; Vector3 dst = _dst; src.x -= CFunction.GetTerrainLeft(); src.z -= CFunction.GetTerrainTop(); dst.x -= CFunction.GetTerrainLeft(); dst.z -= CFunction.GetTerrainTop(); return(InnerTraceDetail(src, dst, ref hits, ref hit_count)); }