Commit 6061465b authored by Haobo38's avatar Haobo38
Browse files

rotation and position ajustement

parent 25908078
Pipeline #99944 failed with stage
in 1 minute and 30 seconds
......@@ -396,7 +396,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
rightHandController: {fileID: 932740382}
leftHandController: {fileID: 919290645}
xrNode: 4
xrNode: 5
--- !u!114 &555889789
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -468,25 +468,25 @@ MonoBehaviour:
m_SelectEntered:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 555889789}
m_TargetAssemblyTypeName: ModelPositionFix, Assembly-CSharp
m_MethodName: EnableZoom
m_Mode: 1
- m_Target: {fileID: 555889788}
m_TargetAssemblyTypeName: UnityEngine.Behaviour, UnityEngine
m_MethodName: set_enabled
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_BoolArgument: 1
m_CallState: 2
m_SelectExited:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 555889789}
m_TargetAssemblyTypeName: ModelPositionFix, Assembly-CSharp
m_MethodName: DisableZoom
m_Mode: 1
- m_Target: {fileID: 555889788}
m_TargetAssemblyTypeName: UnityEngine.Behaviour, UnityEngine
m_MethodName: set_enabled
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
......@@ -1229,6 +1229,51 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_System: {fileID: 874855018}
--- !u!1 &914114375
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 914114376}
- component: {fileID: 914114377}
m_Layer: 0
m_Name: AttachTransforme
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &914114376
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 914114375}
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_Children: []
m_Father: {fileID: 932740378}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &914114377
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 914114375}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7623f7c218b1fb743a77d35f8cf836bd, type: 3}
m_Name:
m_EditorClassIdentifier:
rightHandController: {fileID: 932740382}
rightHandRayInteractor: {fileID: 932740381}
--- !u!1 &919290640
GameObject:
m_ObjectHideFlags: 0
......@@ -1262,6 +1307,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1658469758}
- {fileID: 2017942439}
m_Father: {fileID: 638544101}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -1483,7 +1529,7 @@ MonoBehaviour:
m_Bits: 4294967295
m_InteractionLayers:
m_Bits: 4294967295
m_AttachTransform: {fileID: 0}
m_AttachTransform: {fileID: 2017942439}
m_KeepSelectedTargetValid: 1
m_StartingSelectedInteractable: {fileID: 0}
m_HoverEntered:
......@@ -1534,12 +1580,12 @@ MonoBehaviour:
m_PlayHapticsOnSelectCanceled: 0
m_HapticSelectCancelIntensity: 0
m_HapticSelectCancelDuration: 0
m_PlayHapticsOnHoverEntered: 0
m_HapticHoverEnterIntensity: 0
m_HapticHoverEnterDuration: 0
m_PlayHapticsOnHoverExited: 0
m_HapticHoverExitIntensity: 0
m_HapticHoverExitDuration: 0
m_PlayHapticsOnHoverEntered: 1
m_HapticHoverEnterIntensity: 0.1
m_HapticHoverEnterDuration: 0.1
m_PlayHapticsOnHoverExited: 1
m_HapticHoverExitIntensity: 0.1
m_HapticHoverExitDuration: 0.1
m_PlayHapticsOnHoverCanceled: 0
m_HapticHoverCancelIntensity: 0
m_HapticHoverCancelDuration: 0
......@@ -1563,7 +1609,7 @@ MonoBehaviour:
serializedVersion: 2
m_Bits: 4294967295
m_RaycastTriggerInteraction: 1
m_HitClosestOnly: 0
m_HitClosestOnly: 1
m_HoverToSelect: 0
m_HoverTimeToSelect: 0.5
m_EnableUIInteraction: 1
......@@ -1784,7 +1830,8 @@ Transform:
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_Children: []
m_Children:
- {fileID: 914114376}
m_Father: {fileID: 638544101}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -2006,7 +2053,7 @@ MonoBehaviour:
m_Bits: 4294967295
m_InteractionLayers:
m_Bits: 4294967295
m_AttachTransform: {fileID: 0}
m_AttachTransform: {fileID: 914114376}
m_KeepSelectedTargetValid: 1
m_StartingSelectedInteractable: {fileID: 0}
m_HoverEntered:
......@@ -3023,6 +3070,23 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0.535}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1309062994 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4572740793295701293, guid: 42c17adff852c2142b3513d1649ca2cd, type: 3}
m_PrefabInstance: {fileID: 2020623657}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1309063000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309062994}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 25bcdb048f2ca5d4f9d32ed480a2942d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1424222242
GameObject:
m_ObjectHideFlags: 0
......@@ -3487,7 +3551,7 @@ Mesh:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: pb_Mesh-68740
m_Name: pb_Mesh-1244
serializedVersion: 10
m_SubMeshes:
- serializedVersion: 2
......@@ -3767,6 +3831,51 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1991211130}
m_CullTransparentMesh: 1
--- !u!1 &2017942438
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2017942439}
- component: {fileID: 2017942440}
m_Layer: 0
m_Name: AttachTransformer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2017942439
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2017942438}
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_Children: []
m_Father: {fileID: 919290641}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2017942440
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2017942438}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 64316b7d1055ef046b82f17c2ab58ecc, type: 3}
m_Name:
m_EditorClassIdentifier:
rightHandController: {fileID: 919290645}
leftHandRayInteractor: {fileID: 919290644}
--- !u!1001 &2020623657
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -3838,7 +3947,7 @@ Mesh:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: pb_Mesh-68046
m_Name: pb_Mesh-1316
serializedVersion: 10
m_SubMeshes:
- serializedVersion: 2
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine.XR.Interaction.Toolkit;
using UnityEngine;
using UnityEngine.XR;
using System.Linq;
using InputDeviceXR = UnityEngine.XR.InputDevice;
public class AttachTransforme : MonoBehaviour
{
[SerializeField] XRBaseController rightHandController = null;
[SerializeField] XRRayInteractor leftHandRayInteractor = null;
private Vector3 position;
private RaycastHit hit;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
leftHandRayInteractor.TryGetCurrent3DRaycastHit(out hit);
//if (leftHandRayInteractor.interactablesSelected[1] != null)
if (hit.transform != null)
{
// transform.position = leftHandRayInteractor.interactablesSelected[1].transform.position;
transform.position = hit.transform.position;
transform.rotation = hit.transform.rotation;
Debug.Log("hitting a go with the position : " + transform.position);
}
}
}
fileFormatVersion: 2
guid: 64316b7d1055ef046b82f17c2ab58ecc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine.XR.Interaction.Toolkit;
using UnityEngine;
using UnityEngine.XR;
using System.Linq;
using InputDeviceXR = UnityEngine.XR.InputDevice;
public class AttachTransformeWithForceGrab : MonoBehaviour
{
[SerializeField] XRBaseController rightHandController = null;
[SerializeField] XRRayInteractor rightHandRayInteractor = null;
private Vector3 position;
private RaycastHit hit;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
rightHandRayInteractor.TryGetCurrent3DRaycastHit(out hit);
//if (leftHandRayInteractor.interactablesSelected[1] != null)
if (hit.transform != null)
{
// transform.position = leftHandRayInteractor.interactablesSelected[1].transform.position;
if (hit.transform.gameObject.layer == 6)
{
Debug.Log("hitting a lifecycle " + transform.position);
transform.rotation = hit.transform.rotation;
transform.eulerAngles = new Vector3(0,transform.eulerAngles.y,0);
}
transform.position = rightHandController.transform.position;//+ rightHandController.transform.forward;
transform.rotation = hit.transform.rotation;
Debug.Log("hitting a go with the position : " + transform.position);
}
}
}
fileFormatVersion: 2
guid: 7623f7c218b1fb743a77d35f8cf836bd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Translation : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
fileFormatVersion: 2
guid: 3a712d4c2dadf9246930162c530387a6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class XYRotationFix : MonoBehaviour
{
void FixedUpdate()
{
// transform.rotation.eulerAngles.x = 0f;
transform.eulerAngles = new Vector3(
0,
transform.eulerAngles.y,
0
);
}
}
fileFormatVersion: 2
guid: 25bcdb048f2ca5d4f9d32ed480a2942d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment