针对vr一体机进行修改逻辑
This commit is contained in:
parent
26e73c995e
commit
76462dadbd
@ -123,7 +123,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 598348144801550191}
|
m_GameObject: {fileID: 598348144801550191}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 2.1975, z: -2.25}
|
m_LocalPosition: {x: 0, y: 2.1975, z: 0}
|
||||||
m_LocalScale: {x: 15, y: 15, z: 15}
|
m_LocalScale: {x: 15, y: 15, z: 15}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
@ -172,7 +172,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 765259898297824089}
|
m_GameObject: {fileID: 765259898297824089}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -2.25}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 15, y: 15, z: 15}
|
m_LocalScale: {x: 15, y: 15, z: 15}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
@ -428,7 +428,6 @@ Transform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 4206005111461178323}
|
|
||||||
- {fileID: 1943472158707926008}
|
- {fileID: 1943472158707926008}
|
||||||
- {fileID: 4955625632054724442}
|
- {fileID: 4955625632054724442}
|
||||||
- {fileID: 2220253086530989832}
|
- {fileID: 2220253086530989832}
|
||||||
@ -570,7 +569,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 3400309332038407868}
|
m_GameObject: {fileID: 3400309332038407868}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -0.000000059604645}
|
m_LocalPosition: {x: 0.030000001, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
@ -1064,7 +1063,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 4951725383111470759}
|
m_GameObject: {fileID: 4951725383111470759}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -0.000000059604645}
|
m_LocalPosition: {x: -0.030000001, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
@ -1165,53 +1164,6 @@ MonoBehaviour:
|
|||||||
mipBias: 0
|
mipBias: 0
|
||||||
varianceClampScale: 0.9
|
varianceClampScale: 0.9
|
||||||
contrastAdaptiveSharpening: 0
|
contrastAdaptiveSharpening: 0
|
||||||
--- !u!1 &5295768088636320424
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 4206005111461178323}
|
|
||||||
- component: {fileID: 7751590708231362653}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: ZProvider
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &4206005111461178323
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5295768088636320424}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 6541928711621635503}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!114 &7751590708231362653
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5295768088636320424}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: ae9977e6c48cd7040b272527034d9de1, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
_displayReferenceProfile: 2
|
|
||||||
_displayReferenceSize: {x: 0.521, y: 0.293}
|
|
||||||
_displayReferenceResolution: {x: 1920, y: 1080}
|
|
||||||
--- !u!1 &5647687646066518589
|
--- !u!1 &5647687646066518589
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1440,6 +1392,8 @@ GameObject:
|
|||||||
- component: {fileID: 6835854032803285639}
|
- component: {fileID: 6835854032803285639}
|
||||||
- component: {fileID: 263436429275714491}
|
- component: {fileID: 263436429275714491}
|
||||||
- component: {fileID: 6027451431851870885}
|
- component: {fileID: 6027451431851870885}
|
||||||
|
- component: {fileID: 5140476435316401990}
|
||||||
|
- component: {fileID: 1546245213169538227}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: ZCamera
|
m_Name: ZCamera
|
||||||
m_TagString: MainCamera
|
m_TagString: MainCamera
|
||||||
@ -1456,7 +1410,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 8487585372649695129}
|
m_GameObject: {fileID: 8487585372649695129}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -0.59773743}
|
m_LocalPosition: {x: 0, y: 0, z: -0.41000003}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
@ -1584,6 +1538,30 @@ MonoBehaviour:
|
|||||||
mipBias: 0
|
mipBias: 0
|
||||||
varianceClampScale: 0.9
|
varianceClampScale: 0.9
|
||||||
contrastAdaptiveSharpening: 0
|
contrastAdaptiveSharpening: 0
|
||||||
|
--- !u!114 &5140476435316401990
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8487585372649695129}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!114 &1546245213169538227
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8487585372649695129}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &8683029409827073046
|
--- !u!1 &8683029409827073046
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@ -130,5 +130,13 @@ namespace QFramework
|
|||||||
{
|
{
|
||||||
mOnClosed = onPanelClosed;
|
mOnClosed = onPanelClosed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if VR
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
transform.localEulerAngles = Vector3.zero;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5,7 +5,6 @@ using QFramework;
|
|||||||
using System;
|
using System;
|
||||||
using QFramework.Example;
|
using QFramework.Example;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using TreeEditor;
|
|
||||||
public class TextWindowAction : IAction
|
public class TextWindowAction : IAction
|
||||||
{
|
{
|
||||||
public ulong ActionID { get; set; }
|
public ulong ActionID { get; set; }
|
||||||
|
|||||||
@ -58,14 +58,15 @@ public class FreeCameraController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (isMov)
|
if (isMov)
|
||||||
{
|
{
|
||||||
//// 相机移动
|
#if VR
|
||||||
//float horizontal = Input.GetAxis("Horizontal") * moveSpeed * Time.deltaTime;
|
// Ïà»úÒÆ¶¯
|
||||||
//float vertical = Input.GetAxis("Vertical") * moveSpeed * Time.deltaTime;
|
float horizontal = Input.GetAxis("Horizontal") * moveSpeed * Time.deltaTime;
|
||||||
|
float vertical = Input.GetAxis("Vertical") * moveSpeed * Time.deltaTime;
|
||||||
|
|
||||||
//Vector3 move = transform.right * horizontal + transform.forward * vertical;
|
Vector3 move = transform.right * horizontal + transform.forward * vertical;
|
||||||
|
|
||||||
//transform.position += move;
|
|
||||||
|
|
||||||
|
transform.position += move;
|
||||||
|
#else
|
||||||
|
|
||||||
//W键前进
|
//W键前进
|
||||||
if (Input.GetKey(KeyCode.W))
|
if (Input.GetKey(KeyCode.W))
|
||||||
@ -107,7 +108,7 @@ public class FreeCameraController : MonoBehaviour
|
|||||||
}
|
}
|
||||||
////添加相机QE上下移动功能
|
////添加相机QE上下移动功能
|
||||||
//transform.position+= GetInputTranslationDirection()*0.01f;
|
//transform.position+= GetInputTranslationDirection()*0.01f;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (isRot)
|
if (isRot)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -47,15 +47,30 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
public void SetNear()
|
public void SetNear()
|
||||||
{
|
{
|
||||||
Camera.main.transform.DOMove(mData.nearPos, mData.nearTime);
|
Transform trans = null;
|
||||||
Camera.main.transform.DORotate(mData.nearRot, mData.nearTime);
|
#if VR
|
||||||
|
trans = UIRoot.Instance.transform.Find("ZFrame");
|
||||||
|
#else
|
||||||
|
trans = Camera.main.transform;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
trans.DOMove(mData.nearPos, mData.nearTime);
|
||||||
|
trans.DORotate(mData.nearRot, mData.nearTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetNormal()
|
public void SetNormal()
|
||||||
{
|
{
|
||||||
|
|
||||||
Camera.main.transform.DOMove(mData.normalPos, mData.normalTime);
|
Transform trans = null;
|
||||||
Camera.main.transform.DORotate(mData.normalRot, mData.normalTime);
|
#if VR
|
||||||
|
trans = UIRoot.Instance.transform.Find("ZFrame");
|
||||||
|
#else
|
||||||
|
trans = Camera.main.transform;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
trans.DOMove(mData.normalPos, mData.normalTime);
|
||||||
|
trans.DORotate(mData.normalRot, mData.normalTime);
|
||||||
}
|
}
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user