Skip to content
Snippets Groups Projects
Commit ccb3df2c authored by Mamad Farrahi's avatar Mamad Farrahi
Browse files

fixed head movement to do not go inside of the objects when the user looks...

fixed head movement to do not go inside of the objects when the user looks down and fixed the labels to show properly on VR
parent cab00636
No related branches found
No related tags found
1 merge request!2App Base Implementation
......@@ -2211,20 +2211,20 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 93541476}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 16.54}
m_LocalScale: {x: 0.06, y: 0.06, z: 0.06}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 419526860}
m_Father: {fileID: 2145751207}
m_RootOrder: 4
m_Father: {fileID: 1251483220}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
m_AnchoredPosition: {x: -3.26, y: 7.16}
m_SizeDelta: {x: 200, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &93541478
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -2264,7 +2264,7 @@ MonoBehaviour:
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
m_PresetInfoIsWorld: 1
--- !u!223 &93541480
Canvas:
m_ObjectHideFlags: 0
......@@ -2274,7 +2274,7 @@ Canvas:
m_GameObject: {fileID: 93541476}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
......@@ -6683,7 +6683,7 @@ RectTransform:
m_GameObject: {fileID: 419526859}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -2}
m_LocalScale: {x: 0.98674, y: 1, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 93541477}
......@@ -6691,7 +6691,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -143, y: 258.9}
m_AnchoredPosition: {x: 31.3, y: 0.5}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &419526861
......@@ -11035,7 +11035,6 @@ GameObject:
- component: {fileID: 841132389}
- component: {fileID: 841132395}
- component: {fileID: 841132393}
- component: {fileID: 841132391}
- component: {fileID: 841132392}
- component: {fileID: 841132394}
- component: {fileID: 841132397}
......@@ -11044,9 +11043,10 @@ GameObject:
- component: {fileID: 841132400}
- component: {fileID: 841132401}
- component: {fileID: 841132402}
- component: {fileID: 841132403}
m_Layer: 0
m_Name: XR Origin
m_TagString: Untagged
m_TagString: VRUserBodyPart
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
......@@ -11076,7 +11076,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 841132388}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.15, y: 5.73, z: -10.59}
m_LocalPosition: {x: -3.15, y: 5.73, z: -10.17}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
......@@ -11084,19 +11084,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &841132391
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 841132388}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ae0e2445c5fbcd0468694e408852563c, type: 3}
m_Name:
m_EditorClassIdentifier:
delayBeforeRestart: 3
--- !u!114 &841132392
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -11228,6 +11215,7 @@ MonoBehaviour:
playerTransform: {fileID: 2145751207}
vrCamera: {fileID: 1251483220}
controllerInputManager: {fileID: 0}
canMove: 1
--- !u!114 &841132400
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -11273,6 +11261,19 @@ Rigidbody:
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &841132403
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 841132388}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ae0e2445c5fbcd0468694e408852563c, type: 3}
m_Name:
m_EditorClassIdentifier:
delayBeforeRestart: 3
--- !u!4 &841982808 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 95007187869534612, guid: 866c0e9798879e849904bb9723e8a1bc,
......@@ -15567,7 +15568,9 @@ Transform:
m_LocalPosition: {x: 0.33, y: 7.3200006, z: 0.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 93541477}
- {fileID: 1995106194}
m_Father: {fileID: 2145751207}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -26192,7 +26195,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 9.187117, y: 1.8653975, z: 9.71252, w: 2.2212107}
m_margin: {x: 9.187117, y: 1.8584213, z: 9.71252, w: 2.2212107}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
_SortingLayer: 0
......@@ -26393,7 +26396,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1995106194
RectTransform:
m_ObjectHideFlags: 0
......@@ -26407,8 +26410,8 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 104091535}
m_Father: {fileID: 2145751207}
m_RootOrder: 5
m_Father: {fileID: 1251483220}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
......@@ -26464,7 +26467,7 @@ Canvas:
m_GameObject: {fileID: 1995106193}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_RenderMode: 1
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
......@@ -28197,8 +28200,6 @@ Transform:
- {fileID: 30328063}
- {fileID: 1860304531}
- {fileID: 39433391}
- {fileID: 93541477}
- {fileID: 1995106194}
m_Father: {fileID: 841132390}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -49,7 +49,8 @@ public class HandRun : MonoBehaviour
// Only move the player if the button is pressed and the controller is moved beyond the threshold
if (movedDistance >= thresholdDistance)
{
Vector3 forward = vrCamera.TransformDirection(Vector3.forward);
//Vector3 forward = vrCamera.TransformDirection(Vector3.forward);
Vector3 forward = new Vector3(vrCamera.forward.x, 0, vrCamera.forward.z).normalized;
playerTransform.position += forward * Time.deltaTime * runSpeed;
movedDistance = 0.0f;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment