Merge branch 'feature/teleport' into 'main'

Feature/teleport

See merge request kernel-panic/revival!84
This commit is contained in:
Cat Flynn 2021-05-12 00:55:04 +00:00
commit d1a78220f7
11 changed files with 379 additions and 65 deletions

View File

@ -72,7 +72,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4676633831414007564}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -3.720001}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4676633831945762709}

View File

@ -0,0 +1,142 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4601491045995653740
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3356516348541898668}
m_Layer: 0
m_Name: Out
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3356516348541898668
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4601491045995653740}
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: 4916783602103456685}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &4916783602103456681
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4916783602103456685}
- component: {fileID: 4916783602103456682}
- component: {fileID: 4916783602103456683}
- component: {fileID: 4916783602103456680}
- component: {fileID: 9088042001126627603}
m_Layer: 0
m_Name: Teleporter
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4916783602103456685
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4916783602103456681}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.07, y: -7.884474, z: 6.6539707}
m_LocalScale: {x: 6, y: 1, z: 6}
m_Children:
- {fileID: 3356516348541898668}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4916783602103456682
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4916783602103456681}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4916783602103456683
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4916783602103456681}
m_Enabled: 0
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
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: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
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!65 &4916783602103456680
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4916783602103456681}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &9088042001126627603
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4916783602103456681}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6b15bb066372add4681022c90a1e6859, type: 3}
m_Name:
m_EditorClassIdentifier:
_out: {fileID: 3356516348541898668}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ad3c7b0a4d45eb74fb648a4f058d72cd
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 297bc9a54b5f8474581e43792b3b5b80
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -130,10 +130,6 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4162104920346097835, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 5d5260a94884a404ca29f832ae73dc0f, type: 2}
- target: {fileID: 4676633831318799747, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@ -148,47 +144,47 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4676633831318799747, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.w
value: 0.99989486
value: -0.08388939
objectReference: {fileID: 0}
- target: {fileID: 4676633831318799747, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.x
value: -0.014435155
value: -0.0066759447
objectReference: {fileID: 0}
- target: {fileID: 4676633831318799747, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.y
value: -0.0010120552
value: 0.97543484
objectReference: {fileID: 0}
- target: {fileID: 4676633831318799747, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.z
value: 0.0009651026
value: 0.20358013
objectReference: {fileID: 0}
- target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.x
value: 2.6809309
value: 0.3776713
objectReference: {fileID: 0}
- target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.y
value: 37.136326
value: -0.46750307
objectReference: {fileID: 0}
- target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.z
value: 30.693121
value: -0.014760315
objectReference: {fileID: 0}
- target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.w
value: -0.034833442
value: -0.21576016
objectReference: {fileID: 0}
- target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.x
value: -0.014238992
value: 0.0012456499
objectReference: {fileID: 0}
- target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.y
value: 0.9249942
value: 0.97642934
objectReference: {fileID: 0}
- target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.z
value: -0.37811324
value: 0.0056372276
objectReference: {fileID: 0}
- target: {fileID: 4676633831414007564, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_Name
@ -220,115 +216,87 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.x
value: 0
value: -0.001822842
objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.y
value: 0
value: -0.0056614876
objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.z
value: 0
value: -0.0039527644
objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9901357
value: 0.32467234
objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.x
value: 0.14002495
value: 0.09769373
objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.y
value: 0.002999287
value: -0.9407438
objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.z
value: -0.003911049
value: 0.0066937646
objectReference: {fileID: 0}
- target: {fileID: 4676633832858914731, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.x
value: 0.062937535
value: 0.3776713
objectReference: {fileID: 0}
- target: {fileID: 4676633832858914731, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.y
value: -0.8859338
value: -0.46750307
objectReference: {fileID: 0}
- target: {fileID: 4676633832858914731, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.z
value: 0.017453432
objectReference: {fileID: 0}
- target: {fileID: 4676633832858914731, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.w
value: -0.03483345
objectReference: {fileID: 0}
- target: {fileID: 4676633832858914731, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.x
value: -0.0142389955
objectReference: {fileID: 0}
- target: {fileID: 4676633832858914731, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.y
value: 0.9249942
objectReference: {fileID: 0}
- target: {fileID: 4676633832858914731, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.z
value: -0.37811327
objectReference: {fileID: 0}
- target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.z
value: 0
value: -0.014760315
objectReference: {fileID: 0}
- target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9990779
value: -0.30932572
objectReference: {fileID: 0}
- target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.x
value: 0.042734884
value: -0.042584877
objectReference: {fileID: 0}
- target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.y
value: 0.002826903
value: 0.93956673
objectReference: {fileID: 0}
- target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.z
value: -0.003022612
value: 0.14042255
objectReference: {fileID: 0}
- target: {fileID: 6640567037475532300, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.x
value: 2.6809309
value: 0.3776713
objectReference: {fileID: 0}
- target: {fileID: 6640567037475532300, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.y
value: 37.136326
value: -0.46750307
objectReference: {fileID: 0}
- target: {fileID: 6640567037475532300, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.z
value: 30.693121
value: -0.014760315
objectReference: {fileID: 0}
- target: {fileID: 6640567037475532300, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.w
value: -0.03483344
value: -0.21576025
objectReference: {fileID: 0}
- target: {fileID: 6640567037475532300, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.x
value: -0.014238992
value: 0.0012456509
objectReference: {fileID: 0}
- target: {fileID: 6640567037475532300, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.y
value: 0.9249942
value: 0.97642934
objectReference: {fileID: 0}
- target: {fileID: 6640567037475532300, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.z
value: -0.37811324
value: 0.0056372294
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 938def3eb8c68c64aa1da4eaf3c1be62
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 112000000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,144 @@
fileFormatVersion: 2
guid: a76c97ff81c0e0c4990c6a841c77782e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 1
seamlessCubemap: 1
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: 0
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 2
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 100
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 8192
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
using UnityEngine;
[RequireComponent(typeof(BoxCollider))]
public class Teleporter : MonoBehaviour
{
[SerializeField] private Transform _out;
private void OnEnable()
{
GetComponent<BoxCollider>().isTrigger = true;
}
private void OnTriggerEnter(Collider col)
{
if (!col.gameObject.TryGetComponent(out CharacterController cc)) return;
var go = col.gameObject;
var outPos = _out.position;
cc.enabled = false;
go.transform.position = outPos;
cc.enabled = true;
}
}

View File

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