diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index bbf526d..a6cdcb8 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -137,7 +137,7 @@ GameObject: - component: {fileID: 124415401} m_Layer: 0 m_Name: Cube (2) - m_TagString: Untagged + m_TagString: platform m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -149,14 +149,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 124415399} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -92.17318, y: -58.608616, z: -25.228497} - m_LocalScale: {x: 6.7204876, y: 1.5078, z: 16.238924} + m_LocalRotation: {x: -0, y: -0, z: -0.361422, w: 0.9324024} + m_LocalPosition: {x: -4.8, y: 4.7, z: 47.97} + m_LocalScale: {x: 6.7204885, y: 1.5078, z: 16.238924} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 327689121} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -42.375} --- !u!65 &124415401 BoxCollider: m_ObjectHideFlags: 0 @@ -250,44 +250,11 @@ Transform: m_Children: - {fileID: 708734976} - {fileID: 1429068746} - - {fileID: 124415400} - {fileID: 2031243809} - {fileID: 875163558} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &568358576 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 568358577} - m_Layer: 0 - m_Name: Player - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &568358577 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 568358576} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -1.3092413, y: 5.46, z: 0.88780403} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2075500261} - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &705507993 GameObject: m_ObjectHideFlags: 0 @@ -511,7 +478,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 327689121} - m_RootOrder: 4 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &875163559 BoxCollider: @@ -576,151 +543,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 875163557} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &963194225 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 963194228} - - component: {fileID: 963194227} - - component: {fileID: 963194226} - - component: {fileID: 963194229} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &963194226 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 ---- !u!20 &963194227 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 2 - m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &963194228 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0.534, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2075500261} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &963194229 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} - m_Name: - m_EditorClassIdentifier: - volumeTrigger: {fileID: 963194228} - volumeLayer: - serializedVersion: 2 - m_Bits: 2147483647 - stopNaNPropagation: 1 - finalBlitToCameraTarget: 0 - antialiasingMode: 0 - temporalAntialiasing: - jitterSpread: 0.75 - sharpness: 0.25 - stationaryBlending: 0.95 - motionBlending: 0.85 - subpixelMorphologicalAntialiasing: - quality: 2 - fastApproximateAntialiasing: - fastMode: 0 - keepAlpha: 0 - fog: - enabled: 1 - excludeSkybox: 1 - debugLayer: - lightMeter: - width: 512 - height: 256 - showCurves: 1 - histogram: - width: 512 - height: 256 - channel: 3 - waveform: - exposure: 0.12 - height: 256 - vectorscope: - size: 256 - exposure: 0.12 - overlaySettings: - linearDepth: 0 - motionColorIntensity: 4 - motionGridSize: 64 - colorBlindnessType: 0 - colorBlindnessStrength: 1 - m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} - m_ShowToolkit: 0 - m_ShowCustomSorter: 0 - breakBeforeColorGrading: 0 - m_BeforeTransparentBundles: [] - m_BeforeStackBundles: [] - m_AfterStackBundles: [] --- !u!1 &1429068745 GameObject: m_ObjectHideFlags: 0 @@ -916,7 +738,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 327689121} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &2031243810 BoxCollider: @@ -981,141 +803,92 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2031243808} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &2075500260 -GameObject: +--- !u!1001 &1607899768903742773 +PrefabInstance: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2075500261} - - component: {fileID: 2075500266} - - component: {fileID: 2075500265} - - component: {fileID: 2075500264} - - component: {fileID: 2075500263} - - component: {fileID: 2075500262} - m_Layer: 0 - m_Name: Body - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2075500261 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2075500260} - 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: 963194228} - m_Father: {fileID: 568358577} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2075500262 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2075500260} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b108dca155b156640a1beb1eeaa1995d, type: 3} - m_Name: - m_EditorClassIdentifier: - walkSpeed: 7.5 - runningSpeed: 7.5 - jumpSpeed: 0.7 - lookSpeed: 7.5 - lookXLimit: 7.5 - playerCamera: {fileID: 963194227} - rotationX: 0 - jump: {x: 0, y: 0, z: 0} - jumpForce: 2 ---- !u!54 &2075500263 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2075500260} serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!136 &2075500264 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2075500260} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &2075500265 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2075500260} - 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: 10303, guid: 0000000000000000f000000000000000, type: 0} - 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 &2075500266 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2075500260} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalPosition.x + value: -3.199997 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalPosition.y + value: 6.799999 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalPosition.z + value: 46.6 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160068, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607899769409160069, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_Name + value: Player + objectReference: {fileID: 0} + - target: {fileID: 1607899770050128848, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalPosition.x + value: 1.79 + objectReference: {fileID: 0} + - target: {fileID: 1607899770050128848, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalPosition.y + value: 1.84 + objectReference: {fileID: 0} + - target: {fileID: 1607899770050128848, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalPosition.z + value: -15.3 + objectReference: {fileID: 0} + - target: {fileID: 1607899770050128848, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1607899770050128848, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607899770050128848, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607899770050128848, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1607899770050128848, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5f13a420370189d47af1190ad48f15a9, type: 3} diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index 10fc063..61d9913 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -63,6 +63,9 @@ public class PlayerController : MonoBehaviour if (collision.gameObject.tag == "platform") { this.gameObject.transform.rotation = collision.gameObject.transform.rotation; + Physics.gravity = (collision.gameObject.transform.rotation * Vector3.forward); + Debug.Log(Physics.gravity); + //Physics.gravity = -Physics.gravity; } } } diff --git a/Assets/Scripts/PostProcessingController.cs b/Assets/Scripts/PostProcessingController.cs index 695b3f5..413d2a6 100644 --- a/Assets/Scripts/PostProcessingController.cs +++ b/Assets/Scripts/PostProcessingController.cs @@ -38,6 +38,6 @@ public class PostProcessingController : MonoBehaviour emmisionStep++; renderer.material.SetColor("_EmissionColor", color); - Debug.Log(color); + //Debug.Log(color); } } diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 1c92a78..f22224b 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -3,7 +3,8 @@ --- !u!78 &1 TagManager: serializedVersion: 2 - tags: [] + tags: + - platform layers: - Default - TransparentFX