1
0
mirror of https://projects.caleb-brown.dev/UDRI-XRT/UDRIGEEKCup2024.git synced 2025-01-22 07:08:51 -05:00

Merge pull request 'feature/AR-Anchoring' (#5) from feature/AR-Anchoring into development

Reviewed-on: https://udrimavric.com/MAVRIC/UDRIGolf2024/pulls/5
This commit is contained in:
Joshua Latham 2024-04-17 15:14:45 +00:00
commit a981e6dcba
11 changed files with 658 additions and 43 deletions

View File

@ -0,0 +1,30 @@
using System;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls
{
public class BallPhysics : MonoBehaviour
{
private float baseDrag;
private float baseAngularDrag;
private Rigidbody body;
// Start is called before the first frame update
void Start()
{
body = gameObject.GetComponent<Rigidbody>();
baseDrag = body.drag;
baseAngularDrag = body.angularDrag;
}
private void OnCollisionEnter(Collision other)
{
PhysicsTerrain terrain = other.gameObject.GetComponent<PhysicsTerrain>();
if (terrain == null) return;
body.drag = baseDrag + terrain.drag;
body.angularDrag = baseAngularDrag + terrain.angularDrag;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 472c31289d980c5498f312ff638077fe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
using UnityEngine;
namespace GolfControls
{
public class PhysicsTerrain : MonoBehaviour
{
public float drag;
public float angularDrag;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6e3bff1da8d1f8f4d9e469f0274c2aff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -11,15 +11,19 @@ Material:
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_ValidKeywords:
- _ALPHAPREMULTIPLY_ON
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
RenderType: Transparent
disabledShaderPasses:
- DepthOnly
- SHADOWCASTER
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -93,8 +97,8 @@ Material:
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _DstBlend: 10
- _DstBlendAlpha: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
@ -109,12 +113,12 @@ Material:
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _Surface: 1
- _WorkflowMode: 1
- _ZWrite: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0, g: 0.5188679, b: 0.047602743, a: 1}
- _Color: {r: 0, g: 0.51886785, b: 0.04760272, a: 1}
- _BaseColor: {r: 0, g: 0.51886785, b: 0.04760272, a: 0.4745098}
- _Color: {r: 0, g: 0.5188678, b: 0.0476027, a: 0.4745098}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -11,15 +11,19 @@ Material:
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_ValidKeywords:
- _ALPHAPREMULTIPLY_ON
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
RenderType: Transparent
disabledShaderPasses:
- DepthOnly
- SHADOWCASTER
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -93,8 +97,8 @@ Material:
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _DstBlend: 10
- _DstBlendAlpha: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
@ -109,12 +113,12 @@ Material:
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _Surface: 1
- _WorkflowMode: 1
- _ZWrite: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 0.8559212, b: 0.5330188, a: 1}
- _Color: {r: 1, g: 0.8559212, b: 0.53301877, a: 1}
- _BaseColor: {r: 1, g: 0.8559212, b: 0.53301877, a: 0.6509804}
- _Color: {r: 1, g: 0.8559212, b: 0.53301877, a: 0.6509804}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -960,13 +960,14 @@ GameObject:
- component: {fileID: 371693855}
- component: {fileID: 371693854}
- component: {fileID: 371693853}
- component: {fileID: 371693857}
m_Layer: 0
m_Name: GreensCube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!65 &371693853
BoxCollider:
m_ObjectHideFlags: 0
@ -1046,13 +1047,27 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 371693851}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.5, y: -0.528, z: 6.87}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.7346992, y: -0.5246469, z: 5.5621433}
m_LocalScale: {x: 10, y: 1, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_Father: {fileID: 1895921797}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &371693857
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 371693851}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6e3bff1da8d1f8f4d9e469f0274c2aff, type: 3}
m_Name:
m_EditorClassIdentifier:
drag: 0.1
angularDrag: 0.1
--- !u!1 &434066455
GameObject:
m_ObjectHideFlags: 0
@ -1805,6 +1820,140 @@ MonoBehaviour:
m_Flags: 0
m_Reference: {fileID: 0}
m_ButtonPressPoint: 0.5
--- !u!1 &819962205
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 819962206}
- component: {fileID: 819962208}
- component: {fileID: 819962207}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &819962206
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 819962205}
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: 2014303610}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &819962207
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 819962205}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Anchor
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 0
m_fontSizeMax: 0
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &819962208
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 819962205}
m_CullTransparentMesh: 1
--- !u!1 &1028760414
GameObject:
m_ObjectHideFlags: 0
@ -1882,6 +2031,7 @@ Transform:
- {fileID: 1807783554}
- {fileID: 140252274}
- {fileID: 765144258}
- {fileID: 1663162369}
m_Father: {fileID: 434066458}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1507380958
@ -1896,6 +2046,7 @@ GameObject:
- component: {fileID: 1507380961}
- component: {fileID: 1507380960}
- component: {fileID: 1507380959}
- component: {fileID: 1507380963}
m_Layer: 0
m_Name: FairwayCube
m_TagString: Untagged
@ -1982,13 +2133,132 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1507380958}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 4.532, y: -0.528, z: -3.07}
m_LocalScale: {x: 10, y: 1, z: 10}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -4, y: 0, z: 0}
m_LocalScale: {x: 10, y: 0.1, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_Father: {fileID: 1895921797}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1507380963
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1507380958}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6e3bff1da8d1f8f4d9e469f0274c2aff, type: 3}
m_Name:
m_EditorClassIdentifier:
drag: 0
angularDrag: 0
--- !u!1 &1663162368
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1663162369}
- component: {fileID: 1663162372}
- component: {fileID: 1663162371}
- component: {fileID: 1663162370}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &1663162369
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1663162368}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1320667994}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &1663162370
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1663162368}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1663162371
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1663162368}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2926557707537190794, guid: f396e3429a4864fc2ad497cb3ce5fe2c, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &1663162372
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1663162368}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1752515851
GameObject:
m_ObjectHideFlags: 0
@ -2001,6 +2271,7 @@ GameObject:
- component: {fileID: 1752515855}
- component: {fileID: 1752515854}
- component: {fileID: 1752515853}
- component: {fileID: 1752515857}
m_Layer: 0
m_Name: RoughCube
m_TagString: Untagged
@ -2087,13 +2358,27 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1752515851}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5.48, y: -0.528, z: -3.08}
m_LocalScale: {x: 10, y: 1, z: 10}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 6, y: 0, z: 0}
m_LocalScale: {x: 10, y: 0.1, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_Father: {fileID: 1895921797}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1752515857
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1752515851}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6e3bff1da8d1f8f4d9e469f0274c2aff, type: 3}
m_Name:
m_EditorClassIdentifier:
drag: 0.5
angularDrag: 5
--- !u!1 &1780702392
GameObject:
m_ObjectHideFlags: 0
@ -2585,6 +2870,56 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1895921796
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1895921797}
- component: {fileID: 1895921798}
m_Layer: 0
m_Name: ARContent
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1895921797
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1895921796}
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:
- {fileID: 6435234068943728827}
- {fileID: 4215445498302113601}
- {fileID: 1507380962}
- {fileID: 1752515856}
- {fileID: 371693856}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1895921798
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1895921796}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c03b563f8bcdd214fbf83dfb96488aa3, type: 3}
m_Name:
m_EditorClassIdentifier:
anchorUpdatedEvent: {fileID: 11400000, guid: 13acac687a571c343ab02079296549cd, type: 2}
--- !u!1 &1994603662
GameObject:
m_ObjectHideFlags: 0
@ -2660,6 +2995,140 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1994603662}
m_CullTransparentMesh: 1
--- !u!1 &2014303609
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2014303610}
- component: {fileID: 2014303613}
- component: {fileID: 2014303612}
- component: {fileID: 2014303611}
m_Layer: 5
m_Name: AnchorButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2014303610
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2014303609}
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:
- {fileID: 819962206}
m_Father: {fileID: 3822666867311385266}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.4494792, y: 0.8594445}
m_AnchorMax: {x: 0.57129157, y: 0.9564815}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2014303611
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2014303609}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 2014303612}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 11400000, guid: 13acac687a571c343ab02079296549cd, type: 2}
m_TargetAssemblyTypeName: UnityAtoms.AtomEvent`1[[UnityEngine.GameObject,
UnityEngine
m_MethodName: Raise
m_Mode: 2
m_Arguments:
m_ObjectArgument: {fileID: 1807783553}
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &2014303612
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2014303609}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &2014303613
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2014303609}
m_CullTransparentMesh: 1
--- !u!1 &2041401173
GameObject:
m_ObjectHideFlags: 0
@ -2685,8 +3154,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2041401173}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.05, z: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.23469917, y: 0.0533531, z: -0.30785644}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -3306,6 +3775,7 @@ RectTransform:
- {fileID: 5335464771215372834}
- {fileID: 5969245950916785549}
- {fileID: 8523137829294198608}
- {fileID: 2014303610}
- {fileID: 8967829807584265088}
- {fileID: 1780702393}
m_Father: {fileID: 3872831913057030603}
@ -3379,11 +3849,11 @@ Transform:
m_GameObject: {fileID: 2050288998095584909}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.391, z: 2.823}
m_LocalPosition: {x: -0.23469917, y: 0.56, z: 1.5151435}
m_LocalScale: {x: 0.15, y: 0.5, z: 0.15}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_Father: {fileID: 1895921797}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &4313507671522100049
MeshRenderer:
@ -3707,11 +4177,11 @@ Transform:
m_GameObject: {fileID: 7237674694152796921}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.05, y: 0, z: 0.37}
m_LocalPosition: {x: -0.18469918, y: 0.0737, z: 0.15}
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_Father: {fileID: 1895921797}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6597846410583883976
GameObject:
@ -3900,6 +4370,7 @@ GameObject:
- component: {fileID: 3921340267877587735}
- component: {fileID: 8741305066849015581}
- component: {fileID: 8741305066849015582}
- component: {fileID: 8741305066849015583}
m_Layer: 0
m_Name: TestGolfBall
m_TagString: Untagged
@ -4138,6 +4609,18 @@ MonoBehaviour:
isMovingVariable: {fileID: 11400000, guid: 838a13f5fd312c94398e49cfc36e34ad, type: 2}
inHoleVariable: {fileID: 11400000, guid: 3b0e06d0a76bceb4296c54d02f0d34a4, type: 2}
baseForce: 200
--- !u!114 &8741305066849015583
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7237674694152796921}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 472c31289d980c5498f312ff638077fe, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &8967829807584265088
RectTransform:
m_ObjectHideFlags: 0
@ -4166,11 +4649,7 @@ SceneRoots:
- {fileID: 434066458}
- {fileID: 3872831913057030603}
- {fileID: 7853147040506322296}
- {fileID: 6435234068943728827}
- {fileID: 4215445498302113601}
- {fileID: 2085994267}
- {fileID: 1028760416}
- {fileID: 2041401174}
- {fileID: 1507380962}
- {fileID: 1752515856}
- {fileID: 371693856}
- {fileID: 1895921797}

View File

@ -0,0 +1,30 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityAtoms.BaseAtoms;
using UnityEngine;
public class ARContentParent : MonoBehaviour
{
public GameObjectEvent anchorUpdatedEvent;
private void OnEnable()
{
anchorUpdatedEvent.Register(OnAnchorUpdated);
}
private void OnDisable()
{
anchorUpdatedEvent.Unregister(OnAnchorUpdated);
}
private void OnAnchorUpdated(GameObject anchor)
{
transform.position = anchor.transform.position;
Vector3 rot = anchor.transform.rotation.eulerAngles;
transform.rotation = Quaternion.Euler(0,rot.y,0);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c03b563f8bcdd214fbf83dfb96488aa3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 09747f8c6d9954e4a81c09bb7f6e44a6, type: 3}
m_Name: WorldAnchorUpdated
m_EditorClassIdentifier:
_developerDescription:
_replayBufferSize: 1
_inspectorRaiseValue: {fileID: 0}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 13acac687a571c343ab02079296549cd
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant: