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

Merge branch 'feature/Moving-Floor-Left-Right' into feature/Moving-Floor-Up-Down

# Conflicts:
#	Assets/Scenes/TestControls.unity
This commit is contained in:
Ktaylor 2024-04-22 09:49:51 -04:00
commit c57b958220
4 changed files with 107 additions and 66 deletions

33
Assets/Moving.cs Normal file
View File

@ -0,0 +1,33 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MAVRIC.GEEKCup
{
public class MoveFloor : MonoBehaviour
{
[Range(0f, 10f)]
[SerializeField] private float speed = 1f;
[Range(0f, 10f)]
[SerializeField] private float distance = 1f;
[SerializeField] private Vector3 direction = Vector3.right;
private Vector3 startPos;
private void Start()
{
startPos = transform.position;
}
private void Update()
{
if (Vector3.Distance(startPos, transform.position) >= distance || Vector3.Distance(startPos, transform.position) <= -distance)
{
direction *= -1;
}
transform.Translate((direction * 0.5f) * (speed * Time.deltaTime), Space.Self);
}
}
}

11
Assets/Moving.cs.meta Normal file
View File

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

View File

@ -1,27 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1977579826803422}
m_IsPrefabParent: 1
--- !u!1 &1977579826803422
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4175081708114804}
- component: {fileID: 33473778465350852}
- component: {fileID: 23046709272025714}
- component: {fileID: 65511906868894760}
- component: {fileID: 4307562666089112652}
m_Layer: 0
m_Name: Mavrik_Floor
m_TagString: Untagged
@ -31,29 +22,46 @@ GameObject:
m_IsActive: 1
--- !u!4 &4175081708114804
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1977579826803422}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
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: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33473778465350852
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1977579826803422}
m_Mesh: {fileID: 4300000, guid: e2d5268c4a1f1ad41a3ddb37608c630d, type: 3}
--- !u!23 &23046709272025714
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1977579826803422}
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: 2100000, guid: 2a12d3fc0532ba64e972160db18dfd99, type: 2}
m_StaticBatchInfo:
@ -63,9 +71,11 @@ MeshRenderer:
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
@ -74,22 +84,40 @@ MeshRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &33473778465350852
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1977579826803422}
m_Mesh: {fileID: 4300000, guid: e2d5268c4a1f1ad41a3ddb37608c630d, type: 3}
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &65511906868894760
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1977579826803422}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
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: 5.0003223, y: 0.2504834, z: 5.000693}
m_Center: {x: -2.4997997, y: -0.10384083, z: 2.500337}
--- !u!114 &4307562666089112652
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1977579826803422}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4bab126a795d2f947be3865b060141b4, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 1
distance: 3.54
direction: {x: 2, y: 0, z: 0}

View File

@ -58,7 +58,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4175081708114804, guid: 82dd9495d55e381469aa18791816e641, type: 3}
propertyPath: m_LocalPosition.y
value: 0
value: 1.29
objectReference: {fileID: 0}
- target: {fileID: 4175081708114804, guid: 82dd9495d55e381469aa18791816e641, type: 3}
propertyPath: m_LocalPosition.z
@ -95,11 +95,7 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 1977579826803422, guid: 82dd9495d55e381469aa18791816e641,
type: 3}
insertIndex: -1
addedObject: {fileID: 772773765679882743}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 82dd9495d55e381469aa18791816e641, type: 3}
--- !u!4 &4068998512539540012 stripped
Transform:
@ -107,30 +103,3 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 4069329506645428568}
m_PrefabAsset: {fileID: 0}
--- !u!1 &4070743036836625286 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1977579826803422, guid: 82dd9495d55e381469aa18791816e641,
type: 3}
m_PrefabInstance: {fileID: 4069329506645428568}
m_PrefabAsset: {fileID: 0}
--- !u!95 &772773765679882743
Animator:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4070743036836625286}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 0f5636b1ff083ec4b90fcb326292f161, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0