修改更新

This commit is contained in:
ljj 2023-06-30 17:17:46 +08:00
parent e75e885416
commit 4558ccec21
10 changed files with 347401 additions and 87 deletions

View File

@ -28,7 +28,6 @@
public bool canMoveTargetPos = true;
public bool isLimitAroundPos = false;
public bool isLimitMoveArea = false;
#region Field and Property
/// <summary>
/// Around center.
@ -131,8 +130,9 @@
private void Update()
{
//判断相机是否进入房间内
if (transform.position.y > 3)
if (transform.position.y > 4)
{
//Debug.Log(transform.position.y);
isNear = false;
//显示空间Icon
ModelManager.instance.CameraNear(false);
@ -143,18 +143,18 @@
//隐藏空间Icon
ModelManager.instance.CameraNear(true);
}
if (Input.GetKeyDown(KeyCode.A))
{
Debug.Log(transform.position.x + "," + transform.position.y + "," + transform.position.z + "," + AroundPos.x + "," + AroundPos.y + "," + AroundPos.z);
}
}
public void Init()
{
AroundPos = GetIntersectWithLineAndPlane(transform.position, transform.forward, Vector3.up, transform.up * 3);
Debug.Log("围绕中心点"+AroundPos);
Debug.Log("围绕中心点" + AroundPos);
CurrentDistance = targetDistance = Vector3.Distance(transform.position, AroundPos);
CurrentAngles = targetAngles = transform.eulerAngles;
CurrentAroundPos = targetAroundPos = AroundPos;
@ -163,8 +163,9 @@
/// <summary>
/// 重新计算中心点
/// </summary>
public void InitTarget() {
AroundPos = transform.position+ transform.forward*3;
public void InitTarget()
{
AroundPos = transform.position + transform.forward * 3;
//Debug.Log("围绕中心点"+AroundPos);
CurrentDistance = targetDistance = Vector3.Distance(transform.position, AroundPos);
CurrentAngles = targetAngles = transform.eulerAngles;
@ -175,11 +176,11 @@
public void SetControlModeUIRect(RectTransform rect)
{
_controlMode = ControlMode.UIRect;
}
protected virtual void LateUpdate()
{
@ -200,7 +201,7 @@
}
transform.position = targetPos;
if (_controlMode == ControlMode.ALL)
@ -446,7 +447,7 @@
@ -482,7 +483,7 @@
#region author:wm
#endregion
public static bool isMobile = false;

View File

@ -197,7 +197,7 @@ Material:
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _GlossMapScale: 1
- _Glossiness: 0
- _Glossiness: 1
- _GlossyReflections: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5

View File

@ -197,7 +197,7 @@ Material:
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _GlossMapScale: 1
- _Glossiness: 0.59
- _Glossiness: 0.794
- _GlossyReflections: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5

View File

@ -229,7 +229,7 @@ Material:
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _GlossMapScale: 1
- _Glossiness: 0.368
- _Glossiness: 0.079
- _GlossyReflections: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5

View File

@ -197,7 +197,7 @@ Material:
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _GlossMapScale: 1
- _Glossiness: 0
- _Glossiness: 0.602
- _GlossyReflections: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5

File diff suppressed because it is too large Load Diff

View File

@ -12562,12 +12562,12 @@ GameObject:
- component: {fileID: 1293563870}
- component: {fileID: 1293563869}
m_Layer: 0
m_Name: WuDing
m_Name: "\u540A\u9876"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 0
m_IsActive: 1
--- !u!4 &1293563868
Transform:
m_ObjectHideFlags: 0
@ -214868,6 +214868,7 @@ MonoBehaviour:
camList: []
clients: []
counters: []
_spaceArea: {fileID: 0}
iconPanel: {fileID: 0}
heatPoints: []
m_Vector3s: []
@ -438388,7 +438389,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!223 &1926564803572105914
Canvas:
m_ObjectHideFlags: 0
@ -438422,10 +438423,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3

View File

@ -6,9 +6,9 @@ using UnityEngine.EventSystems;
public class ClientClick : MonoBehaviour
{
//人员编号
//人员编号
public int index;
//是否允许单体化展示
//是否允许单体化展示
public bool isSingle = false;
void Start()
@ -26,11 +26,11 @@ public class ClientClick : MonoBehaviour
{
if (EventSystem.current.IsPointerOverGameObject())
{
Debug.Log("鼠标在UI上");
Debug.Log("鼠标在UI上");
return;
}
ViewCenter();
//智慧运营模块
//智慧运营模块
if (Main.intance.curModuleIndex == 1)
Main.intance.m_htmlPanel.CallFunction("showOverTimeTip");
if (!isSingle)
@ -40,14 +40,14 @@ public class ClientClick : MonoBehaviour
}
/// <summary>
/// 视角居中
/// 视角居中
/// </summary>
void ViewCenter()
{
Debug.Log("model" + transform.name);
//获取模型中心点位置(加上模型方向*3X轴方向朝前
//获取模型中心点位置(加上模型方向*3X轴方向朝前
Vector3 playerPos = transform.position + transform.right * 3;
//相机面向设备
//相机面向设备
Quaternion angle = Quaternion.LookRotation(-transform.right);
Debug.Log("pos" + playerPos + ";angle" + angle);
//Main.intance.mainCamera.GetComponent<CameraView>().CameraMoveTarget(playerPos, angle);
@ -55,37 +55,34 @@ public class ClientClick : MonoBehaviour
}
/// <summary>
/// 单体化展示
/// 单体化展示
/// </summary>
void ShowSingle()
{
//设备信息弹窗
//设备信息弹窗
Main.intance.m_htmlPanel.CallFunction("U3DShowPeopleDetails", 0);
//将上一个单体化物体隐藏
//将上一个单体化物体隐藏
if (Main.intance.CurentSingleObj != null)
{
Main.intance.singleCam.GetComponent<Camera360>().ChangeObjLayer(Main.intance.CurentSingleObj, "Default");
}
//显示单体化展示页面
//显示单体化展示页面
Main.intance.CurentSinglePage.SetActive(true);
//将当前物体设置为单体化360观察的物体
//将当前物体设置为单体化360观察的物体
Main.intance.CurentSingleObj = gameObject;
Main.intance.singleCam.GetComponent<Camera360>().SetTarget(transform);
Main.intance.singleCam.GetComponent<Camera360>().ChangeObjLayer(Main.intance.CurentSingleObj, "single360");
Main.intance.ShowSingleModel(true);
}
/// <summary>
/// 在自身添加碰撞体
/// 在自身添加碰撞体
/// </summary>
/// <param name="gameObject"></param>
public void AddGameObjectCollider()
{
//获取物体的最小包围盒
//获取物体的最小包围盒
Bounds itemBound = GetLocalBounds(gameObject);
if (!gameObject.GetComponent<Collider>())
@ -97,7 +94,7 @@ public class ClientClick : MonoBehaviour
}
/// <summary>
/// 获得对象的最小包围盒
/// 获得对象的最小包围盒
/// </summary>
public static Bounds GetLocalBounds(GameObject target)
{

View File

@ -55,7 +55,7 @@ public class Main : UIBase
//切换视角时相机移动速度
private float camMoveSpeed=6;
//待机时长
private float waitTime=120;
private float waitTime=8;
Tweener t_camAnimAngle;
Tweener t_camAnimPos;

View File

@ -36,7 +36,7 @@ public class ModelManager : MonoBehaviour
//空间Icon特效光圈
private List<GameObject> spaceEffectList;
//分区
private GameObject _spaceArea;
public GameObject _spaceArea;
//异常Icon
private List<Exception3DIcon> expIconList;
@ -62,9 +62,9 @@ public class ModelManager : MonoBehaviour
void Start()
{
expIconList = new List<Exception3DIcon>();
wuDing = transform.Find("WuDing");
wuDing = transform.Find("吊顶");
iconPanel = transform.Find("3DIconPanel");
_spaceArea = transform.Find("fenqu").gameObject;
//_spaceArea = transform.Find("fenqu").gameObject;
changePage = transform.Find("ChangeHeatmapEffect").GetComponent<ParticleSystem>();
heatmap = GetComponentInChildren<Heatmap>(true);
m_heatpoint = GetComponentInChildren<HeatPointManager>(true);