diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs b/FallUnity/Assets/Leaves/LeafHandler.cs new file mode 100644 index 0000000..505c300 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafHandler : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs b/FallUnity/Assets/Leaves/LeafHandler.cs new file mode 100644 index 0000000..505c300 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafHandler : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs.meta b/FallUnity/Assets/Leaves/LeafHandler.cs.meta new file mode 100644 index 0000000..a8b73ab --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7c526b2c54a6cc841aca85a6cf4cca83 +timeCreated: 1572071128 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs b/FallUnity/Assets/Leaves/LeafHandler.cs new file mode 100644 index 0000000..505c300 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafHandler : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs.meta b/FallUnity/Assets/Leaves/LeafHandler.cs.meta new file mode 100644 index 0000000..a8b73ab --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7c526b2c54a6cc841aca85a6cf4cca83 +timeCreated: 1572071128 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs b/FallUnity/Assets/Leaves/LeafPhysics.cs new file mode 100644 index 0000000..4685480 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafPhysics : MonoBehaviour { + private Rigidbody body; + // Use this for initialization + void Start () { + body = GetComponentInChildren(); + } + + public float TorqueForceUpScale = 0.3f; + public float TorqueScale = 1.0f; + public float TorqueBounds = 5.0f; + + // Update is called once per frame + void Update () { + + + float torqueX = -transform.up.x; + float torqueZ = -transform.up.z; + float forceUp = Mathf.Abs(torqueX) * TorqueForceUpScale + Mathf.Abs(torqueZ) * TorqueForceUpScale; + body.AddRelativeForce(Vector3.up * forceUp); + body.AddRelativeTorque(new Vector3(Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueX * TorqueScale)), 0, Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueZ * TorqueScale)))); + } +} diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs b/FallUnity/Assets/Leaves/LeafHandler.cs new file mode 100644 index 0000000..505c300 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafHandler : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs.meta b/FallUnity/Assets/Leaves/LeafHandler.cs.meta new file mode 100644 index 0000000..a8b73ab --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7c526b2c54a6cc841aca85a6cf4cca83 +timeCreated: 1572071128 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs b/FallUnity/Assets/Leaves/LeafPhysics.cs new file mode 100644 index 0000000..4685480 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafPhysics : MonoBehaviour { + private Rigidbody body; + // Use this for initialization + void Start () { + body = GetComponentInChildren(); + } + + public float TorqueForceUpScale = 0.3f; + public float TorqueScale = 1.0f; + public float TorqueBounds = 5.0f; + + // Update is called once per frame + void Update () { + + + float torqueX = -transform.up.x; + float torqueZ = -transform.up.z; + float forceUp = Mathf.Abs(torqueX) * TorqueForceUpScale + Mathf.Abs(torqueZ) * TorqueForceUpScale; + body.AddRelativeForce(Vector3.up * forceUp); + body.AddRelativeTorque(new Vector3(Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueX * TorqueScale)), 0, Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueZ * TorqueScale)))); + } +} diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs.meta b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta new file mode 100644 index 0000000..c6d4b5d --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5ef0022eccc191d49979a6953de16c79 +timeCreated: 1572071148 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs b/FallUnity/Assets/Leaves/LeafHandler.cs new file mode 100644 index 0000000..505c300 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafHandler : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs.meta b/FallUnity/Assets/Leaves/LeafHandler.cs.meta new file mode 100644 index 0000000..a8b73ab --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7c526b2c54a6cc841aca85a6cf4cca83 +timeCreated: 1572071128 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs b/FallUnity/Assets/Leaves/LeafPhysics.cs new file mode 100644 index 0000000..4685480 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafPhysics : MonoBehaviour { + private Rigidbody body; + // Use this for initialization + void Start () { + body = GetComponentInChildren(); + } + + public float TorqueForceUpScale = 0.3f; + public float TorqueScale = 1.0f; + public float TorqueBounds = 5.0f; + + // Update is called once per frame + void Update () { + + + float torqueX = -transform.up.x; + float torqueZ = -transform.up.z; + float forceUp = Mathf.Abs(torqueX) * TorqueForceUpScale + Mathf.Abs(torqueZ) * TorqueForceUpScale; + body.AddRelativeForce(Vector3.up * forceUp); + body.AddRelativeTorque(new Vector3(Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueX * TorqueScale)), 0, Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueZ * TorqueScale)))); + } +} diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs.meta b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta new file mode 100644 index 0000000..c6d4b5d --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5ef0022eccc191d49979a6953de16c79 +timeCreated: 1572071148 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial new file mode 100644 index 0000000..e077548 --- /dev/null +++ b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: LeafPhysics + dynamicFriction: 0.6 + staticFriction: 1.95 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs b/FallUnity/Assets/Leaves/LeafHandler.cs new file mode 100644 index 0000000..505c300 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafHandler : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs.meta b/FallUnity/Assets/Leaves/LeafHandler.cs.meta new file mode 100644 index 0000000..a8b73ab --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7c526b2c54a6cc841aca85a6cf4cca83 +timeCreated: 1572071128 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs b/FallUnity/Assets/Leaves/LeafPhysics.cs new file mode 100644 index 0000000..4685480 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafPhysics : MonoBehaviour { + private Rigidbody body; + // Use this for initialization + void Start () { + body = GetComponentInChildren(); + } + + public float TorqueForceUpScale = 0.3f; + public float TorqueScale = 1.0f; + public float TorqueBounds = 5.0f; + + // Update is called once per frame + void Update () { + + + float torqueX = -transform.up.x; + float torqueZ = -transform.up.z; + float forceUp = Mathf.Abs(torqueX) * TorqueForceUpScale + Mathf.Abs(torqueZ) * TorqueForceUpScale; + body.AddRelativeForce(Vector3.up * forceUp); + body.AddRelativeTorque(new Vector3(Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueX * TorqueScale)), 0, Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueZ * TorqueScale)))); + } +} diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs.meta b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta new file mode 100644 index 0000000..c6d4b5d --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5ef0022eccc191d49979a6953de16c79 +timeCreated: 1572071148 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial new file mode 100644 index 0000000..e077548 --- /dev/null +++ b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: LeafPhysics + dynamicFriction: 0.6 + staticFriction: 1.95 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta new file mode 100644 index 0000000..f12a45b --- /dev/null +++ b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 97c74a7f776c04147bded0021cd8dd16 +timeCreated: 1572070829 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs b/FallUnity/Assets/Leaves/LeafHandler.cs new file mode 100644 index 0000000..505c300 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafHandler : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs.meta b/FallUnity/Assets/Leaves/LeafHandler.cs.meta new file mode 100644 index 0000000..a8b73ab --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7c526b2c54a6cc841aca85a6cf4cca83 +timeCreated: 1572071128 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs b/FallUnity/Assets/Leaves/LeafPhysics.cs new file mode 100644 index 0000000..4685480 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafPhysics : MonoBehaviour { + private Rigidbody body; + // Use this for initialization + void Start () { + body = GetComponentInChildren(); + } + + public float TorqueForceUpScale = 0.3f; + public float TorqueScale = 1.0f; + public float TorqueBounds = 5.0f; + + // Update is called once per frame + void Update () { + + + float torqueX = -transform.up.x; + float torqueZ = -transform.up.z; + float forceUp = Mathf.Abs(torqueX) * TorqueForceUpScale + Mathf.Abs(torqueZ) * TorqueForceUpScale; + body.AddRelativeForce(Vector3.up * forceUp); + body.AddRelativeTorque(new Vector3(Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueX * TorqueScale)), 0, Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueZ * TorqueScale)))); + } +} diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs.meta b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta new file mode 100644 index 0000000..c6d4b5d --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5ef0022eccc191d49979a6953de16c79 +timeCreated: 1572071148 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial new file mode 100644 index 0000000..e077548 --- /dev/null +++ b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: LeafPhysics + dynamicFriction: 0.6 + staticFriction: 1.95 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta new file mode 100644 index 0000000..f12a45b --- /dev/null +++ b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 97c74a7f776c04147bded0021cd8dd16 +timeCreated: 1572070829 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/level.unity b/FallUnity/Assets/level.unity index 28b294b..5fb4304 100644 --- a/FallUnity/Assets/level.unity +++ b/FallUnity/Assets/level.unity @@ -38,7 +38,7 @@ m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} + m_IndirectSpecularColor: {r: 0.447304, g: 0.4926479, b: 0.55053383, a: 1} --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -112,47 +112,6 @@ debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &51756787 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 51756788} - - component: {fileID: 51756789} - m_Layer: 0 - m_Name: GroundCollider - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &51756788 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 51756787} - 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: 1772932289} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &51756789 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 51756787} - 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!1 &257733088 GameObject: m_ObjectHideFlags: 0 @@ -180,7 +139,6 @@ m_Children: - {fileID: 1772932289} - {fileID: 763199061} - - {fileID: 1865828294} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -214,7 +172,7 @@ m_LocalScale: {x: 13.184225, y: 13.184217, z: 13.184217} m_Children: [] m_Father: {fileID: 1772932289} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0} --- !u!64 &277372080 MeshCollider: @@ -489,13 +447,13 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 763199060} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: 0.17022383, y: 0.2886038, z: 0.052221533, w: 0.94074684} + m_LocalPosition: {x: -8.81, y: 4.62, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 257733089} m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} + m_LocalEulerAnglesHint: {x: 16.866001, y: 35.873, z: 11.849001} --- !u!108 &763199062 Light: m_ObjectHideFlags: 0 @@ -532,6 +490,34 @@ m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 +--- !u!1 &951496405 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 951496406} + m_Layer: 0 + m_Name: LeafHandler + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &951496406 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 951496405} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 3.890625, y: 2.002445, z: 4.985762} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1118406554 GameObject: m_ObjectHideFlags: 0 @@ -605,6 +591,47 @@ m_SpriteTileMode: 0 m_WasSpriteAssigned: 1 m_MaskInteraction: 0 +--- !u!1 &1206131915 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1206131916} + - component: {fileID: 1206131917} + m_Layer: 0 + m_Name: Spawner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1206131916 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1206131915} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.09, y: 7.71, z: 4.985762} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1206131917 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1206131915} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 540cb6c0be5490d4687e3eb9c06ab209, type: 3} + m_Name: + m_EditorClassIdentifier: + Radius: 1 --- !u!1 &1272122407 GameObject: m_ObjectHideFlags: 0 @@ -730,7 +757,7 @@ far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 5 + orthographic size: 2 m_Depth: 0 m_CullingMask: serializedVersion: 2 @@ -886,7 +913,6 @@ m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 51756788} - {fileID: 277372079} m_Father: {fileID: 257733089} m_RootOrder: 0 @@ -995,70 +1021,3 @@ m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 31.29, y: 0, z: 0} ---- !u!1001 &1865828293 -Prefab: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 257733089} - m_Modifications: - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalPosition.y - value: -0.12 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalPosition.z - value: 0.7040976 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.x - value: -0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.y - value: -0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.z - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.w - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 100100000, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - m_IsPrefabParent: 0 ---- !u!4 &1865828294 stripped -Transform: - m_PrefabParentObject: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, - type: 2} - m_PrefabInternal: {fileID: 1865828293} ---- !u!1 &1865828295 stripped -GameObject: - m_PrefabParentObject: {fileID: 1179573681969856, guid: 1701be1f15e160d4d904862548ae69de, - type: 2} - m_PrefabInternal: {fileID: 1865828293} ---- !u!54 &1865828296 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1865828295} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs b/FallUnity/Assets/Leaves/LeafHandler.cs new file mode 100644 index 0000000..505c300 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafHandler : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs.meta b/FallUnity/Assets/Leaves/LeafHandler.cs.meta new file mode 100644 index 0000000..a8b73ab --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7c526b2c54a6cc841aca85a6cf4cca83 +timeCreated: 1572071128 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs b/FallUnity/Assets/Leaves/LeafPhysics.cs new file mode 100644 index 0000000..4685480 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafPhysics : MonoBehaviour { + private Rigidbody body; + // Use this for initialization + void Start () { + body = GetComponentInChildren(); + } + + public float TorqueForceUpScale = 0.3f; + public float TorqueScale = 1.0f; + public float TorqueBounds = 5.0f; + + // Update is called once per frame + void Update () { + + + float torqueX = -transform.up.x; + float torqueZ = -transform.up.z; + float forceUp = Mathf.Abs(torqueX) * TorqueForceUpScale + Mathf.Abs(torqueZ) * TorqueForceUpScale; + body.AddRelativeForce(Vector3.up * forceUp); + body.AddRelativeTorque(new Vector3(Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueX * TorqueScale)), 0, Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueZ * TorqueScale)))); + } +} diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs.meta b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta new file mode 100644 index 0000000..c6d4b5d --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5ef0022eccc191d49979a6953de16c79 +timeCreated: 1572071148 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial new file mode 100644 index 0000000..e077548 --- /dev/null +++ b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: LeafPhysics + dynamicFriction: 0.6 + staticFriction: 1.95 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta new file mode 100644 index 0000000..f12a45b --- /dev/null +++ b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 97c74a7f776c04147bded0021cd8dd16 +timeCreated: 1572070829 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/level.unity b/FallUnity/Assets/level.unity index 28b294b..5fb4304 100644 --- a/FallUnity/Assets/level.unity +++ b/FallUnity/Assets/level.unity @@ -38,7 +38,7 @@ m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} + m_IndirectSpecularColor: {r: 0.447304, g: 0.4926479, b: 0.55053383, a: 1} --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -112,47 +112,6 @@ debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &51756787 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 51756788} - - component: {fileID: 51756789} - m_Layer: 0 - m_Name: GroundCollider - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &51756788 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 51756787} - 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: 1772932289} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &51756789 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 51756787} - 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!1 &257733088 GameObject: m_ObjectHideFlags: 0 @@ -180,7 +139,6 @@ m_Children: - {fileID: 1772932289} - {fileID: 763199061} - - {fileID: 1865828294} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -214,7 +172,7 @@ m_LocalScale: {x: 13.184225, y: 13.184217, z: 13.184217} m_Children: [] m_Father: {fileID: 1772932289} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0} --- !u!64 &277372080 MeshCollider: @@ -489,13 +447,13 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 763199060} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: 0.17022383, y: 0.2886038, z: 0.052221533, w: 0.94074684} + m_LocalPosition: {x: -8.81, y: 4.62, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 257733089} m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} + m_LocalEulerAnglesHint: {x: 16.866001, y: 35.873, z: 11.849001} --- !u!108 &763199062 Light: m_ObjectHideFlags: 0 @@ -532,6 +490,34 @@ m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 +--- !u!1 &951496405 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 951496406} + m_Layer: 0 + m_Name: LeafHandler + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &951496406 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 951496405} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 3.890625, y: 2.002445, z: 4.985762} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1118406554 GameObject: m_ObjectHideFlags: 0 @@ -605,6 +591,47 @@ m_SpriteTileMode: 0 m_WasSpriteAssigned: 1 m_MaskInteraction: 0 +--- !u!1 &1206131915 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1206131916} + - component: {fileID: 1206131917} + m_Layer: 0 + m_Name: Spawner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1206131916 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1206131915} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.09, y: 7.71, z: 4.985762} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1206131917 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1206131915} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 540cb6c0be5490d4687e3eb9c06ab209, type: 3} + m_Name: + m_EditorClassIdentifier: + Radius: 1 --- !u!1 &1272122407 GameObject: m_ObjectHideFlags: 0 @@ -730,7 +757,7 @@ far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 5 + orthographic size: 2 m_Depth: 0 m_CullingMask: serializedVersion: 2 @@ -886,7 +913,6 @@ m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 51756788} - {fileID: 277372079} m_Father: {fileID: 257733089} m_RootOrder: 0 @@ -995,70 +1021,3 @@ m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 31.29, y: 0, z: 0} ---- !u!1001 &1865828293 -Prefab: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 257733089} - m_Modifications: - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalPosition.y - value: -0.12 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalPosition.z - value: 0.7040976 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.x - value: -0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.y - value: -0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.z - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.w - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 100100000, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - m_IsPrefabParent: 0 ---- !u!4 &1865828294 stripped -Transform: - m_PrefabParentObject: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, - type: 2} - m_PrefabInternal: {fileID: 1865828293} ---- !u!1 &1865828295 stripped -GameObject: - m_PrefabParentObject: {fileID: 1179573681969856, guid: 1701be1f15e160d4d904862548ae69de, - type: 2} - m_PrefabInternal: {fileID: 1865828293} ---- !u!54 &1865828296 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1865828295} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 diff --git a/FallUnity/ProjectSettings/DynamicsManager.asset b/FallUnity/ProjectSettings/DynamicsManager.asset index 0be3d78..fcc0b24 100644 --- a/FallUnity/ProjectSettings/DynamicsManager.asset +++ b/FallUnity/ProjectSettings/DynamicsManager.asset @@ -4,7 +4,7 @@ PhysicsManager: m_ObjectHideFlags: 0 serializedVersion: 3 - m_Gravity: {x: 0, y: -9.81, z: 0} + m_Gravity: {x: 0, y: -1.33, z: 0} m_DefaultMaterial: {fileID: 0} m_BounceThreshold: 2 m_SleepThreshold: 0.005 @@ -15,6 +15,6 @@ m_QueriesHitTriggers: 1 m_EnableAdaptiveForce: 0 m_EnablePCM: 1 - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_LayerCollisionMatrix: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff m_AutoSimulation: 1 m_AutoSyncTransforms: 1 diff --git a/FallUnity/Assets/Game.meta b/FallUnity/Assets/Game.meta new file mode 100644 index 0000000..f3eb7fa --- /dev/null +++ b/FallUnity/Assets/Game.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 000aca661c0e82c4ca90632b73293d45 +folderAsset: yes +timeCreated: 1572072233 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Game/LeafSpawner.cs b/FallUnity/Assets/Game/LeafSpawner.cs new file mode 100644 index 0000000..98828bf --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +public class LeafSpawner : MonoBehaviour { + public Radius Radius = new Radius { Radius = 1 }; + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnSceneGUI() + { + Handles.matrix = transform.localToWorldMatrix; + Radius = Handles.RadiusHandle(Quaternion.identity, Vector3.zero, Radius); + } + +} + +[CustomEditor(typeof(Radius)] +public class RadiusEditor : Editor +{ + +} + +public struct Radius +{ + public float Radius; +} + + + diff --git a/FallUnity/Assets/Game/LeafSpawner.cs.meta b/FallUnity/Assets/Game/LeafSpawner.cs.meta new file mode 100644 index 0000000..372d32f --- /dev/null +++ b/FallUnity/Assets/Game/LeafSpawner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 540cb6c0be5490d4687e3eb9c06ab209 +timeCreated: 1572072241 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial new file mode 100644 index 0000000..29b2033 --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: GroundPhysics + dynamicFriction: 0.6 + staticFriction: 0.6 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta new file mode 100644 index 0000000..c9dc77e --- /dev/null +++ b/FallUnity/Assets/Ground/GroundPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b7da08e26ab67394da4bd04c31cbe10a +timeCreated: 1572070851 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Leaf.prefab b/FallUnity/Assets/Leaves/Leaf.prefab index 9fc2d67..539c1d1 100644 --- a/FallUnity/Assets/Leaves/Leaf.prefab +++ b/FallUnity/Assets/Leaves/Leaf.prefab @@ -20,7 +20,7 @@ m_Component: - component: {fileID: 4058292913024936} - component: {fileID: 64245676651122126} - m_Layer: 0 + m_Layer: 10 m_Name: LeafCollider m_TagString: Untagged m_Icon: {fileID: 0} @@ -35,7 +35,9 @@ serializedVersion: 5 m_Component: - component: {fileID: 4112338132911916} - m_Layer: 0 + - component: {fileID: 54734295098261424} + - component: {fileID: 114579094665962866} + m_Layer: 10 m_Name: Leaf m_TagString: Untagged m_Icon: {fileID: 0} @@ -52,8 +54,25 @@ - component: {fileID: 4236831107365300} - component: {fileID: 33610613474087176} - component: {fileID: 23431041766034224} - m_Layer: 0 - m_Name: LeafPlane + m_Layer: 10 + m_Name: LeafPlaneBot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1264651266555116 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4268844896831280} + - component: {fileID: 33592025355111572} + - component: {fileID: 23996035672917302} + m_Layer: 10 + m_Name: LeafPlaneTop m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -67,7 +86,7 @@ m_GameObject: {fileID: 1072828139650178} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.005, y: 0, z: -0.0161} - m_LocalScale: {x: 0.03897288, y: 0.04318334, z: 0.032148644} + m_LocalScale: {x: 0.06130239, y: 0.04318334, z: 0.040370498} m_Children: [] m_Father: {fileID: 4112338132911916} m_RootOrder: 1 @@ -78,23 +97,37 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1179573681969856} - m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: 0.5} - m_LocalPosition: {x: 0, y: -0.12, z: 0.7040976} + m_LocalRotation: {x: 0.0000021243409, y: 0.000022810054, z: 0.08261662, w: 0.99658144} + m_LocalPosition: {x: -0.1, y: 2.03, z: 0.1} m_LocalScale: {x: 0.45633748, y: 1, z: 1} m_Children: - - {fileID: 4236831107365300} + - {fileID: 4268844896831280} - {fileID: 4058292913024936} + - {fileID: 4236831107365300} m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.003, z: 9.478001} --- !u!4 &4236831107365300 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} + m_LocalRotation: {x: -0, y: -0, z: -9.735962e-14, w: 1} + m_LocalPosition: {x: 0, y: -0.001, z: 0} + m_LocalScale: {x: 0.027304355, y: -1, z: 0.027309999} + m_Children: [] + m_Father: {fileID: 4112338132911916} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 90} +--- !u!4 &4268844896831280 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.001, z: 0} m_LocalScale: {x: 0.027308851, y: 0.027308846, z: 0.027308846} m_Children: [] m_Father: {fileID: 4112338132911916} @@ -134,6 +167,47 @@ m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!23 &23996035672917302 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 53a193fb35289d849b5bd28728f3a194, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &33592025355111572 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1264651266555116} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!33 &33610613474087176 MeshFilter: m_ObjectHideFlags: 1 @@ -141,17 +215,46 @@ m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1253281220073292} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54734295098261424 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 5.51 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!64 &64245676651122126 MeshCollider: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 1072828139650178} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 97c74a7f776c04147bded0021cd8dd16, type: 2} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Convex: 0 + m_Convex: 1 m_InflateMesh: 0 m_SkinWidth: 0.01 m_Mesh: {fileID: 4300000, guid: 815e7170e36908b45a7fb950f1c0fcb7, type: 3} +--- !u!114 &114579094665962866 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1179573681969856} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ef0022eccc191d49979a6953de16c79, type: 3} + m_Name: + m_EditorClassIdentifier: + TorqueForceUpScale: 2.91 + TorqueScale: 0.1 + TorqueBounds: 1.66 diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs b/FallUnity/Assets/Leaves/LeafHandler.cs new file mode 100644 index 0000000..505c300 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafHandler : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/FallUnity/Assets/Leaves/LeafHandler.cs.meta b/FallUnity/Assets/Leaves/LeafHandler.cs.meta new file mode 100644 index 0000000..a8b73ab --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafHandler.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7c526b2c54a6cc841aca85a6cf4cca83 +timeCreated: 1572071128 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs b/FallUnity/Assets/Leaves/LeafPhysics.cs new file mode 100644 index 0000000..4685480 --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class LeafPhysics : MonoBehaviour { + private Rigidbody body; + // Use this for initialization + void Start () { + body = GetComponentInChildren(); + } + + public float TorqueForceUpScale = 0.3f; + public float TorqueScale = 1.0f; + public float TorqueBounds = 5.0f; + + // Update is called once per frame + void Update () { + + + float torqueX = -transform.up.x; + float torqueZ = -transform.up.z; + float forceUp = Mathf.Abs(torqueX) * TorqueForceUpScale + Mathf.Abs(torqueZ) * TorqueForceUpScale; + body.AddRelativeForce(Vector3.up * forceUp); + body.AddRelativeTorque(new Vector3(Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueX * TorqueScale)), 0, Mathf.Max(-TorqueBounds, Mathf.Min(TorqueBounds, torqueZ * TorqueScale)))); + } +} diff --git a/FallUnity/Assets/Leaves/LeafPhysics.cs.meta b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta new file mode 100644 index 0000000..c6d4b5d --- /dev/null +++ b/FallUnity/Assets/Leaves/LeafPhysics.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5ef0022eccc191d49979a6953de16c79 +timeCreated: 1572071148 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial new file mode 100644 index 0000000..e077548 --- /dev/null +++ b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial @@ -0,0 +1,13 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!134 &13400000 +PhysicMaterial: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: LeafPhysics + dynamicFriction: 0.6 + staticFriction: 1.95 + bounciness: 0 + frictionCombine: 0 + bounceCombine: 0 diff --git a/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta new file mode 100644 index 0000000..f12a45b --- /dev/null +++ b/FallUnity/Assets/Leaves/Materials/LeafPhysics.physicMaterial.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 97c74a7f776c04147bded0021cd8dd16 +timeCreated: 1572070829 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 13400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/FallUnity/Assets/level.unity b/FallUnity/Assets/level.unity index 28b294b..5fb4304 100644 --- a/FallUnity/Assets/level.unity +++ b/FallUnity/Assets/level.unity @@ -38,7 +38,7 @@ m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} + m_IndirectSpecularColor: {r: 0.447304, g: 0.4926479, b: 0.55053383, a: 1} --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -112,47 +112,6 @@ debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &51756787 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 51756788} - - component: {fileID: 51756789} - m_Layer: 0 - m_Name: GroundCollider - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &51756788 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 51756787} - 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: 1772932289} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &51756789 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 51756787} - 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!1 &257733088 GameObject: m_ObjectHideFlags: 0 @@ -180,7 +139,6 @@ m_Children: - {fileID: 1772932289} - {fileID: 763199061} - - {fileID: 1865828294} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -214,7 +172,7 @@ m_LocalScale: {x: 13.184225, y: 13.184217, z: 13.184217} m_Children: [] m_Father: {fileID: 1772932289} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0} --- !u!64 &277372080 MeshCollider: @@ -489,13 +447,13 @@ m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 763199060} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: 0.17022383, y: 0.2886038, z: 0.052221533, w: 0.94074684} + m_LocalPosition: {x: -8.81, y: 4.62, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 257733089} m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} + m_LocalEulerAnglesHint: {x: 16.866001, y: 35.873, z: 11.849001} --- !u!108 &763199062 Light: m_ObjectHideFlags: 0 @@ -532,6 +490,34 @@ m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 +--- !u!1 &951496405 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 951496406} + m_Layer: 0 + m_Name: LeafHandler + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &951496406 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 951496405} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 3.890625, y: 2.002445, z: 4.985762} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1118406554 GameObject: m_ObjectHideFlags: 0 @@ -605,6 +591,47 @@ m_SpriteTileMode: 0 m_WasSpriteAssigned: 1 m_MaskInteraction: 0 +--- !u!1 &1206131915 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1206131916} + - component: {fileID: 1206131917} + m_Layer: 0 + m_Name: Spawner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1206131916 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1206131915} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.09, y: 7.71, z: 4.985762} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1206131917 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1206131915} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 540cb6c0be5490d4687e3eb9c06ab209, type: 3} + m_Name: + m_EditorClassIdentifier: + Radius: 1 --- !u!1 &1272122407 GameObject: m_ObjectHideFlags: 0 @@ -730,7 +757,7 @@ far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 5 + orthographic size: 2 m_Depth: 0 m_CullingMask: serializedVersion: 2 @@ -886,7 +913,6 @@ m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 51756788} - {fileID: 277372079} m_Father: {fileID: 257733089} m_RootOrder: 0 @@ -995,70 +1021,3 @@ m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 31.29, y: 0, z: 0} ---- !u!1001 &1865828293 -Prefab: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 257733089} - m_Modifications: - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalPosition.y - value: -0.12 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalPosition.z - value: 0.7040976 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.x - value: -0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.y - value: -0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.z - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_LocalRotation.w - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 100100000, guid: 1701be1f15e160d4d904862548ae69de, type: 2} - m_IsPrefabParent: 0 ---- !u!4 &1865828294 stripped -Transform: - m_PrefabParentObject: {fileID: 4112338132911916, guid: 1701be1f15e160d4d904862548ae69de, - type: 2} - m_PrefabInternal: {fileID: 1865828293} ---- !u!1 &1865828295 stripped -GameObject: - m_PrefabParentObject: {fileID: 1179573681969856, guid: 1701be1f15e160d4d904862548ae69de, - type: 2} - m_PrefabInternal: {fileID: 1865828293} ---- !u!54 &1865828296 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1865828295} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 diff --git a/FallUnity/ProjectSettings/DynamicsManager.asset b/FallUnity/ProjectSettings/DynamicsManager.asset index 0be3d78..fcc0b24 100644 --- a/FallUnity/ProjectSettings/DynamicsManager.asset +++ b/FallUnity/ProjectSettings/DynamicsManager.asset @@ -4,7 +4,7 @@ PhysicsManager: m_ObjectHideFlags: 0 serializedVersion: 3 - m_Gravity: {x: 0, y: -9.81, z: 0} + m_Gravity: {x: 0, y: -1.33, z: 0} m_DefaultMaterial: {fileID: 0} m_BounceThreshold: 2 m_SleepThreshold: 0.005 @@ -15,6 +15,6 @@ m_QueriesHitTriggers: 1 m_EnableAdaptiveForce: 0 m_EnablePCM: 1 - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_LayerCollisionMatrix: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff m_AutoSimulation: 1 m_AutoSyncTransforms: 1 diff --git a/FallUnity/ProjectSettings/TagManager.asset b/FallUnity/ProjectSettings/TagManager.asset index 534f5c5..16e70bc 100644 --- a/FallUnity/ProjectSettings/TagManager.asset +++ b/FallUnity/ProjectSettings/TagManager.asset @@ -15,7 +15,7 @@ - - bg - hide - - + - leaf - - -