From c1dcc838270a0a6bc1b9d5679cf790108e53b7a8 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Mon, 9 Mar 2026 13:08:31 +0100 Subject: [PATCH] Initial Ant setup --- Animation.meta | 8 + Animation/AntAnimator.controller | 146 ++ Animation/AntAnimator.controller.meta | 8 + Animation/AntRotateLeft.anim | 1303 +++++++++++++++++ Animation/AntRotateLeft.anim.meta | 8 + Animation/AntRotateRight.anim | 1303 +++++++++++++++++ Animation/AntRotateRight.anim.meta | 8 + Animation/AntWalk.anim | 1181 +++++++++++++++ Animation/AntWalk.anim.meta | 8 + CreatureControl.meta | 8 + CreatureControl/Editor.meta | 8 + CreatureControl/Editor/Scripts.meta | 8 + .../Editor/Scripts/Creature_Editor.cs | 44 + .../Editor/Scripts/Creature_Editor.cs.meta | 11 + CreatureControl/Editor/Scripts/Insect.meta | 8 + .../Editor/Scripts/Insect/Insect_Editor.cs | 79 + .../Scripts/Insect/Insect_Editor.cs.meta | 11 + CreatureControl/Editor/Scripts/Leg_Editor.cs | 75 + .../Editor/Scripts/Leg_Editor.cs.meta | 11 + CreatureControl/Runtime.meta | 8 + CreatureControl/Runtime/Scripts.meta | 8 + CreatureControl/Runtime/Scripts/Creature.cs | 26 + .../Runtime/Scripts/Creature.cs.meta | 11 + CreatureControl/Runtime/Scripts/Insect.meta | 8 + .../Runtime/Scripts/Insect/Insect.cs | 13 + .../Runtime/Scripts/Insect/Insect.cs.meta | 11 + CreatureControl/Runtime/Scripts/Leg.cs | 8 + CreatureControl/Runtime/Scripts/Leg.cs.meta | 11 + CreatureControl/Runtime/Scripts/LegTarget.cs | 14 + .../Runtime/Scripts/LegTarget.cs.meta | 11 + CreatureControl/Runtime/Scripts/TargetLeg.cs | 168 +++ .../Runtime/Scripts/TargetLeg.cs.meta | 11 + CreatureControl/Runtime/Scripts/TargetRig.cs | 81 + .../Runtime/Scripts/TargetRig.cs.meta | 11 + Editor.meta | 2 +- Editor/Scripts.meta | 8 + Editor/Scripts/Ant_Editor.cs | 22 + Editor/Scripts/Ant_Editor.cs.meta | 11 + NanoBrain.meta | 8 + NanoBrain/Cluster.cs.meta | 11 +- NanoBrain/ClusterPrefab.cs.meta | 11 +- NanoBrain/ClusterReceptor.cs.meta | 11 +- NanoBrain/Editor/BrainPickerWindow.cs.meta | 11 +- NanoBrain/Editor/ClusterInspector.cs.meta | 11 +- NanoBrain/Editor/DAGWindow.cs.meta | 11 +- NanoBrain/Editor/NanoBrain_Editor.cs.meta | 11 +- NanoBrain/IReceptor.cs.meta | 11 +- NanoBrain/LinearAlgebra/test/SphericalTest.cs | 4 +- NanoBrain/MemoryCell.cs.meta | 11 +- NanoBrain/NanoBrain.cs.meta | 11 +- NanoBrain/Neuron.cs | 2 + NanoBrain/Neuron.cs.meta | 11 +- NanoBrain/Nucleus.cs.meta | 11 +- NanoBrain/NucleusArray.cs.meta | 11 +- NanoBrain/Receptor.cs.meta | 11 +- NanoBrain/Synapse.cs.meta | 11 +- Runtime/Resources.meta | 8 + Runtime/Resources/InsectTargetRig.prefab | 765 ++++++++++ Runtime/Resources/InsectTargetRig.prefab.meta | 7 + Runtime/Scripts/AnimatedAnt.cs | 245 ---- Runtime/Scripts/Ant.cs | 249 ++++ .../{AnimatedAnt.cs.meta => Ant.cs.meta} | 0 Runtime/Scripts/AntsNest.cs | 52 +- Runtime/Scripts/Mouth.cs | 110 +- 64 files changed, 5954 insertions(+), 340 deletions(-) create mode 100644 Animation.meta create mode 100644 Animation/AntAnimator.controller create mode 100644 Animation/AntAnimator.controller.meta create mode 100644 Animation/AntRotateLeft.anim create mode 100644 Animation/AntRotateLeft.anim.meta create mode 100644 Animation/AntRotateRight.anim create mode 100644 Animation/AntRotateRight.anim.meta create mode 100644 Animation/AntWalk.anim create mode 100644 Animation/AntWalk.anim.meta create mode 100644 CreatureControl.meta create mode 100644 CreatureControl/Editor.meta create mode 100644 CreatureControl/Editor/Scripts.meta create mode 100644 CreatureControl/Editor/Scripts/Creature_Editor.cs create mode 100644 CreatureControl/Editor/Scripts/Creature_Editor.cs.meta create mode 100644 CreatureControl/Editor/Scripts/Insect.meta create mode 100644 CreatureControl/Editor/Scripts/Insect/Insect_Editor.cs create mode 100644 CreatureControl/Editor/Scripts/Insect/Insect_Editor.cs.meta create mode 100644 CreatureControl/Editor/Scripts/Leg_Editor.cs create mode 100644 CreatureControl/Editor/Scripts/Leg_Editor.cs.meta create mode 100644 CreatureControl/Runtime.meta create mode 100644 CreatureControl/Runtime/Scripts.meta create mode 100644 CreatureControl/Runtime/Scripts/Creature.cs create mode 100644 CreatureControl/Runtime/Scripts/Creature.cs.meta create mode 100644 CreatureControl/Runtime/Scripts/Insect.meta create mode 100644 CreatureControl/Runtime/Scripts/Insect/Insect.cs create mode 100644 CreatureControl/Runtime/Scripts/Insect/Insect.cs.meta create mode 100644 CreatureControl/Runtime/Scripts/Leg.cs create mode 100644 CreatureControl/Runtime/Scripts/Leg.cs.meta create mode 100644 CreatureControl/Runtime/Scripts/LegTarget.cs create mode 100644 CreatureControl/Runtime/Scripts/LegTarget.cs.meta create mode 100644 CreatureControl/Runtime/Scripts/TargetLeg.cs create mode 100644 CreatureControl/Runtime/Scripts/TargetLeg.cs.meta create mode 100644 CreatureControl/Runtime/Scripts/TargetRig.cs create mode 100644 CreatureControl/Runtime/Scripts/TargetRig.cs.meta create mode 100644 Editor/Scripts.meta create mode 100644 Editor/Scripts/Ant_Editor.cs create mode 100644 Editor/Scripts/Ant_Editor.cs.meta create mode 100644 NanoBrain.meta create mode 100644 Runtime/Resources.meta create mode 100644 Runtime/Resources/InsectTargetRig.prefab create mode 100644 Runtime/Resources/InsectTargetRig.prefab.meta delete mode 100644 Runtime/Scripts/AnimatedAnt.cs create mode 100644 Runtime/Scripts/Ant.cs rename Runtime/Scripts/{AnimatedAnt.cs.meta => Ant.cs.meta} (100%) diff --git a/Animation.meta b/Animation.meta new file mode 100644 index 0000000..72a83f1 --- /dev/null +++ b/Animation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 129468cd2362336149b803fa12f962c0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Animation/AntAnimator.controller b/Animation/AntAnimator.controller new file mode 100644 index 0000000..8499afe --- /dev/null +++ b/Animation/AntAnimator.controller @@ -0,0 +1,146 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!206 &-7807188484574405462 +BlendTree: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blend Tree + m_Childs: + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: b8a731a1533b8c960b3f3688d4922a24, type: 2} + m_Threshold: 0 + m_Position: {x: 0, y: 1} + m_TimeScale: 10 + m_CycleOffset: 0 + m_DirectBlendParameter: Forward + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: ab82ff68e62ea3b1c8e6523f8d46c142, type: 2} + m_Threshold: 0.5 + m_Position: {x: -1, y: 0} + m_TimeScale: 5 + m_CycleOffset: 0 + m_DirectBlendParameter: Forward + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 91229db5e929c379bbfd5bf417848488, type: 2} + m_Threshold: 1 + m_Position: {x: 1, y: 0} + m_TimeScale: 5 + m_CycleOffset: 0 + m_DirectBlendParameter: Forward + m_Mirror: 0 + m_BlendParameter: Rotate + m_BlendParameterY: Forward + m_MinThreshold: 0 + m_MaxThreshold: 1 + m_UseAutomaticThresholds: 1 + m_NormalizedBlendValues: 0 + m_BlendType: 3 +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: AntAnimator + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: Forward + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: Rotate + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 2310030155210667225} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1101 &2088305737403053393 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 0} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 1 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.75 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1107 &2310030155210667225 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 5197032680816450026} + m_Position: {x: 80, y: 250, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 40, y: 500, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 5197032680816450026} +--- !u!1102 &5197032680816450026 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: AntWalk + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: 2088305737403053393} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: -7807188484574405462} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: diff --git a/Animation/AntAnimator.controller.meta b/Animation/AntAnimator.controller.meta new file mode 100644 index 0000000..6b61d05 --- /dev/null +++ b/Animation/AntAnimator.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d4b9f32bef604abd5953647ad53ca0f7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Animation/AntRotateLeft.anim b/Animation/AntRotateLeft.anim new file mode 100644 index 0000000..95197fe --- /dev/null +++ b/Animation/AntRotateLeft.anim @@ -0,0 +1,1303 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: AntRotateLeft + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: 0, y: 5.625, z: 0} + inSlope: {x: 0, y: 67.5, z: 0} + outSlope: {x: 0, y: 67.5, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 0, y: 11.25, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: 0, y: 5.625, z: 0} + inSlope: {x: 0, y: -67.5, z: 0} + outSlope: {x: 0, y: -67.5, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: -67.50001, z: 0} + outSlope: {x: 0, y: -67.50001, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: -5.625, z: 0} + inSlope: {x: 0, y: -67.50001, z: 0} + outSlope: {x: 0, y: -67.50001, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: 0, y: -11.25, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: 0, y: -5.625, z: 0} + inSlope: {x: 0, y: 67.49999, z: 0} + outSlope: {x: 0, y: 67.49999, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.6666667 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/LeftFeetTarget + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: 0, y: -5.625, z: 0} + inSlope: {x: 0, y: -67.5, z: 0} + outSlope: {x: 0, y: -67.5, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 0, y: -11.25, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: 0, y: -5.625, z: 0} + inSlope: {x: 0, y: 67.5, z: 0} + outSlope: {x: 0, y: 67.5, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 67.50001, z: 0} + outSlope: {x: 0, y: 67.50001, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: 5.625, z: 0} + inSlope: {x: 0, y: 67.50001, z: 0} + outSlope: {x: 0, y: 67.50001, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: 0, y: 11.25, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: 0, y: 5.625, z: 0} + inSlope: {x: 0, y: -67.49999, z: 0} + outSlope: {x: 0, y: -67.49999, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.6666667 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/RightFeetTarget + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 22.786, z: -90} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: -5.625, y: 22.786, z: -90} + inSlope: {x: -67.5, y: 0, z: 0} + outSlope: {x: -67.5, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: -11.25, y: 22.786, z: -90} + inSlope: {x: -67.50001, y: 0, z: 0} + outSlope: {x: -67.50001, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: -16.875, y: 22.786, z: -90} + inSlope: {x: -67.5, y: 0, z: 0} + outSlope: {x: -67.5, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: -22.5, y: 22.786, z: -90} + inSlope: {x: -67.50001, y: 0, z: 0} + outSlope: {x: -67.50001, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: -28.125, y: 22.786, z: -90} + inSlope: {x: -67.50001, y: 0, z: 0} + outSlope: {x: -67.50001, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: -33.75, y: 22.786, z: -90} + inSlope: {x: -67.50001, y: 0, z: 0} + outSlope: {x: -67.50001, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: -39.375, y: 22.786, z: -90} + inSlope: {x: -67.49999, y: 0, z: 0} + outSlope: {x: -67.49999, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.6666667 + value: {x: -45, y: 22.786, z: -90} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: 0, y: 0.015, z: 0} + inSlope: {x: 0, y: 0.12, z: 0} + outSlope: {x: 0, y: 0.12, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 0, y: 0.02, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: 0.015, z: 0} + inSlope: {x: 0, y: -0.120000005, z: 0} + outSlope: {x: 0, y: -0.120000005, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/LeftFeetTarget + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0.02, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: 0, y: 0.015, z: 0} + inSlope: {x: 0, y: -0.12, z: 0} + outSlope: {x: 0, y: -0.12, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 0, y: 0.0015937508, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: 0, y: 0.015, z: 0} + inSlope: {x: 0, y: 0.11999998, z: 0} + outSlope: {x: 0, y: 0.11999998, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.6666667 + value: {x: 0, y: 0.02, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/RightFeetTarget + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 683997697 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1250470035 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 683997697 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1250470035 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.6666667 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: 5.625 + inSlope: 67.5 + outSlope: 67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 11.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: 5.625 + inSlope: -67.5 + outSlope: -67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0 + inSlope: -67.50001 + outSlope: -67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: -5.625 + inSlope: -67.50001 + outSlope: -67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: -11.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: -5.625 + inSlope: 67.49999 + outSlope: 67.49999 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: -5.625 + inSlope: -67.5 + outSlope: -67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: -11.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: -5.625 + inSlope: 67.5 + outSlope: 67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0 + inSlope: 67.50001 + outSlope: 67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 5.625 + inSlope: 67.50001 + outSlope: 67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 11.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: 5.625 + inSlope: -67.49999 + outSlope: -67.49999 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: 0.015 + inSlope: 0.12 + outSlope: 0.12 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.015 + inSlope: -0.120000005 + outSlope: -0.120000005 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: 0.015 + inSlope: -0.12 + outSlope: -0.12 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.0015937508 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: 0.015 + inSlope: 0.11999998 + outSlope: 0.11999998 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: -5.625 + inSlope: -67.5 + outSlope: -67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: -11.25 + inSlope: -67.50001 + outSlope: -67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: -16.875 + inSlope: -67.5 + outSlope: -67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: -22.5 + inSlope: -67.50001 + outSlope: -67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: -28.125 + inSlope: -67.50001 + outSlope: -67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: -33.75 + inSlope: -67.50001 + outSlope: -67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: -39.375 + inSlope: -67.49999 + outSlope: -67.49999 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: -45 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 22.786 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -90 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Animation/AntRotateLeft.anim.meta b/Animation/AntRotateLeft.anim.meta new file mode 100644 index 0000000..6898389 --- /dev/null +++ b/Animation/AntRotateLeft.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab82ff68e62ea3b1c8e6523f8d46c142 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Animation/AntRotateRight.anim b/Animation/AntRotateRight.anim new file mode 100644 index 0000000..7f0f1d5 --- /dev/null +++ b/Animation/AntRotateRight.anim @@ -0,0 +1,1303 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: AntRotateRight + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: 0, y: -5.625, z: 0} + inSlope: {x: 0, y: -67.5, z: 0} + outSlope: {x: 0, y: -67.5, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 0, y: -11.25, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: 0, y: -5.625, z: 0} + inSlope: {x: 0, y: 67.5, z: 0} + outSlope: {x: 0, y: 67.5, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 67.50001, z: 0} + outSlope: {x: 0, y: 67.50001, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: 5.625, z: 0} + inSlope: {x: 0, y: 67.50001, z: 0} + outSlope: {x: 0, y: 67.50001, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: 0, y: 11.25, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: 0, y: 5.625, z: 0} + inSlope: {x: 0, y: -67.49999, z: 0} + outSlope: {x: 0, y: -67.49999, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.6666667 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/LeftFeetTarget + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: 0, y: 5.625, z: 0} + inSlope: {x: 0, y: 67.5, z: 0} + outSlope: {x: 0, y: 67.5, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 0, y: 11.25, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: 0, y: 5.625, z: 0} + inSlope: {x: 0, y: -67.5, z: 0} + outSlope: {x: 0, y: -67.5, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: -67.50001, z: 0} + outSlope: {x: 0, y: -67.50001, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: -5.625, z: 0} + inSlope: {x: 0, y: -67.50001, z: 0} + outSlope: {x: 0, y: -67.50001, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: 0, y: -11.25, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: 0, y: -5.625, z: 0} + inSlope: {x: 0, y: 67.49999, z: 0} + outSlope: {x: 0, y: 67.49999, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.6666667 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/RightFeetTarget + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 22.786, z: -90} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: 5.625, y: 22.786, z: -90} + inSlope: {x: 67.5, y: 0, z: 0} + outSlope: {x: 67.5, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 11.25, y: 22.786, z: -90} + inSlope: {x: 67.50001, y: 0, z: 0} + outSlope: {x: 67.50001, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: 16.875, y: 22.786, z: -90} + inSlope: {x: 67.5, y: 0, z: 0} + outSlope: {x: 67.5, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 22.5, y: 22.786, z: -90} + inSlope: {x: 67.50001, y: 0, z: 0} + outSlope: {x: 67.50001, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 28.125, y: 22.786, z: -90} + inSlope: {x: 67.50001, y: 0, z: 0} + outSlope: {x: 67.50001, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: 33.75, y: 22.786, z: -90} + inSlope: {x: 67.50001, y: 0, z: 0} + outSlope: {x: 67.50001, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: 39.375, y: 22.786, z: -90} + inSlope: {x: 67.49999, y: 0, z: 0} + outSlope: {x: 67.49999, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.6666667 + value: {x: 45, y: 22.786, z: -90} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: 0, y: 0.015, z: 0} + inSlope: {x: 0, y: 0.12, z: 0} + outSlope: {x: 0, y: 0.12, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 0, y: 0.02, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: 0.015, z: 0} + inSlope: {x: 0, y: -0.120000005, z: 0} + outSlope: {x: 0, y: -0.120000005, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/LeftFeetTarget + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0.02, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.083333336 + value: {x: 0, y: 0.015, z: 0} + inSlope: {x: 0, y: -0.12, z: 0} + outSlope: {x: 0, y: -0.12, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.16666667 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.25 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.33333334 + value: {x: 0, y: 0.0015937508, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.5833333 + value: {x: 0, y: 0.015, z: 0} + inSlope: {x: 0, y: 0.11999998, z: 0} + outSlope: {x: 0, y: 0.11999998, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.6666667 + value: {x: 0, y: 0.02, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/RightFeetTarget + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 683997697 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1250470035 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 683997697 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1250470035 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 4 + script: {fileID: 0} + typeID: 4 + customType: 4 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.6666667 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: -5.625 + inSlope: -67.5 + outSlope: -67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: -11.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: -5.625 + inSlope: 67.5 + outSlope: 67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0 + inSlope: 67.50001 + outSlope: 67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 5.625 + inSlope: 67.50001 + outSlope: 67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 11.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: 5.625 + inSlope: -67.49999 + outSlope: -67.49999 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: 5.625 + inSlope: 67.5 + outSlope: 67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 11.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: 5.625 + inSlope: -67.5 + outSlope: -67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0 + inSlope: -67.50001 + outSlope: -67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: -5.625 + inSlope: -67.50001 + outSlope: -67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: -11.25 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: -5.625 + inSlope: 67.49999 + outSlope: 67.49999 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: 0.015 + inSlope: 0.12 + outSlope: 0.12 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.015 + inSlope: -0.120000005 + outSlope: -0.120000005 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: 0.015 + inSlope: -0.12 + outSlope: -0.12 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.0015937508 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: 0.015 + inSlope: 0.11999998 + outSlope: 0.11999998 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.083333336 + value: 5.625 + inSlope: 67.5 + outSlope: 67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.16666667 + value: 11.25 + inSlope: 67.50001 + outSlope: 67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.25 + value: 16.875 + inSlope: 67.5 + outSlope: 67.5 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 22.5 + inSlope: 67.50001 + outSlope: 67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 28.125 + inSlope: 67.50001 + outSlope: 67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 33.75 + inSlope: 67.50001 + outSlope: 67.50001 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5833333 + value: 39.375 + inSlope: 67.49999 + outSlope: 67.49999 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: 45 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 22.786 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -90 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Animation/AntRotateRight.anim.meta b/Animation/AntRotateRight.anim.meta new file mode 100644 index 0000000..0d19dd7 --- /dev/null +++ b/Animation/AntRotateRight.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 91229db5e929c379bbfd5bf417848488 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Animation/AntWalk.anim b/Animation/AntWalk.anim new file mode 100644 index 0000000..91e1c9f --- /dev/null +++ b/Animation/AntWalk.anim @@ -0,0 +1,1181 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: AntWalk + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0.02, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.20833333 + value: {x: 0, y: 0.015, z: 0.01} + inSlope: {x: 0, y: -0.048, z: 0.048} + outSlope: {x: 0, y: -0.048, z: 0.048} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: 0, z: 0.02} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.625 + value: {x: 0, y: 0, z: 0.01} + inSlope: {x: 0, y: 0, z: -0.048} + outSlope: {x: 0, y: 0, z: -0.048} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.8333333 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: -0.048000004} + outSlope: {x: 0, y: 0, z: -0.048000004} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.0416666 + value: {x: 0, y: 0, z: -0.01} + inSlope: {x: 0, y: 0, z: -0.047999997} + outSlope: {x: 0, y: 0, z: -0.047999997} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.25 + value: {x: 0, y: 0, z: -0.02} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4583334 + value: {x: 0, y: 0.015, z: -0.01} + inSlope: {x: 0, y: 0.048000004, z: 0.048000004} + outSlope: {x: 0, y: 0.048000004, z: 0.048000004} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.6666666 + value: {x: 0, y: 0.02, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/LeftFeetTarget + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.20833333 + value: {x: 0, y: 0, z: -0.01} + inSlope: {x: 0, y: 0, z: -0.048} + outSlope: {x: 0, y: 0, z: -0.048} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: 0, z: -0.02} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.625 + value: {x: 0, y: 0.015, z: -0.01} + inSlope: {x: 0, y: 0.048, z: 0.048} + outSlope: {x: 0, y: 0.048, z: 0.048} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.8333333 + value: {x: 0, y: 0.02, z: 0} + inSlope: {x: 0, y: 0, z: 0.048000004} + outSlope: {x: 0, y: 0, z: 0.048000004} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.0416666 + value: {x: 0, y: 0.015, z: 0.01} + inSlope: {x: 0, y: -0.047999997, z: 0.047999997} + outSlope: {x: 0, y: -0.047999997, z: 0.047999997} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.25 + value: {x: 0, y: 0, z: 0.02} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4583334 + value: {x: 0, y: 0, z: 0.01} + inSlope: {x: 0, y: 0, z: -0.048000004} + outSlope: {x: 0, y: 0, z: -0.048000004} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.6666666 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Body/RightFeetTarget + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.20833333 + value: {x: 0, y: 0, z: 0.01} + inSlope: {x: 0, y: 0, z: 0.048} + outSlope: {x: 0, y: 0, z: 0.048} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.41666666 + value: {x: 0, y: 0, z: 0.02} + inSlope: {x: 0, y: 0, z: 0.047999997} + outSlope: {x: 0, y: 0, z: 0.047999997} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.625 + value: {x: 0, y: 0, z: 0.03} + inSlope: {x: 0, y: 0, z: 0.048} + outSlope: {x: 0, y: 0, z: 0.048} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.8333333 + value: {x: 0, y: 0, z: 0.04} + inSlope: {x: 0, y: 0, z: 0.048000008} + outSlope: {x: 0, y: 0, z: 0.048000008} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.0416666 + value: {x: 0, y: 0, z: 0.05} + inSlope: {x: 0, y: 0, z: 0.047999997} + outSlope: {x: 0, y: 0, z: 0.047999997} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.25 + value: {x: 0, y: 0, z: 0.06} + inSlope: {x: 0, y: 0, z: 0.04799999} + outSlope: {x: 0, y: 0, z: 0.04799999} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.4583334 + value: {x: 0, y: 0, z: 0.07} + inSlope: {x: 0, y: 0, z: 0.048000004} + outSlope: {x: 0, y: 0, z: 0.048000004} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1.6666666 + value: {x: 0, y: 0, z: 0.08} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 24 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 683997697 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 1250470035 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1.6666666 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.20833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.625 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0416666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.25 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4583334 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.20833333 + value: 0.015 + inSlope: -0.048 + outSlope: -0.048 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.625 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0416666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.25 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4583334 + value: 0.015 + inSlope: 0.048000004 + outSlope: 0.048000004 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6666666 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.20833333 + value: 0.01 + inSlope: 0.048 + outSlope: 0.048 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.625 + value: 0.01 + inSlope: -0.048 + outSlope: -0.048 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 0 + inSlope: -0.048000004 + outSlope: -0.048000004 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0416666 + value: -0.01 + inSlope: -0.047999997 + outSlope: -0.047999997 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.25 + value: -0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4583334 + value: -0.01 + inSlope: 0.048000004 + outSlope: 0.048000004 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Body/LeftFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.20833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.625 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0416666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.25 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4583334 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.20833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.625 + value: 0.015 + inSlope: 0.048 + outSlope: 0.048 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0416666 + value: 0.015 + inSlope: -0.047999997 + outSlope: -0.047999997 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.25 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4583334 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.20833333 + value: -0.01 + inSlope: -0.048 + outSlope: -0.048 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: -0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.625 + value: -0.01 + inSlope: 0.048 + outSlope: 0.048 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 0 + inSlope: 0.048000004 + outSlope: 0.048000004 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0416666 + value: 0.01 + inSlope: 0.047999997 + outSlope: 0.047999997 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.25 + value: 0.02 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4583334 + value: 0.01 + inSlope: -0.048000004 + outSlope: -0.048000004 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: Body/RightFeetTarget + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.20833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.625 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0416666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.25 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4583334 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.20833333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.625 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0416666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.25 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4583334 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6666666 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.20833333 + value: 0.01 + inSlope: 0.048 + outSlope: 0.048 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.41666666 + value: 0.02 + inSlope: 0.047999997 + outSlope: 0.047999997 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.625 + value: 0.03 + inSlope: 0.048 + outSlope: 0.048 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 0.04 + inSlope: 0.048000008 + outSlope: 0.048000008 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.0416666 + value: 0.05 + inSlope: 0.047999997 + outSlope: 0.047999997 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.25 + value: 0.06 + inSlope: 0.04799999 + outSlope: 0.04799999 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.4583334 + value: 0.07 + inSlope: 0.048000004 + outSlope: 0.048000004 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1.6666666 + value: 0.08 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Animation/AntWalk.anim.meta b/Animation/AntWalk.anim.meta new file mode 100644 index 0000000..2640621 --- /dev/null +++ b/Animation/AntWalk.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b8a731a1533b8c960b3f3688d4922a24 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl.meta b/CreatureControl.meta new file mode 100644 index 0000000..7911192 --- /dev/null +++ b/CreatureControl.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ead5f2201e9c95549acb5631aad16b67 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Editor.meta b/CreatureControl/Editor.meta new file mode 100644 index 0000000..d9c13b1 --- /dev/null +++ b/CreatureControl/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d715489a5eda538a959b6e4cb89d1bc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Editor/Scripts.meta b/CreatureControl/Editor/Scripts.meta new file mode 100644 index 0000000..dc23f72 --- /dev/null +++ b/CreatureControl/Editor/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c9680189a3ff3bf0c9d72edaa1aa07e4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Editor/Scripts/Creature_Editor.cs b/CreatureControl/Editor/Scripts/Creature_Editor.cs new file mode 100644 index 0000000..706d242 --- /dev/null +++ b/CreatureControl/Editor/Scripts/Creature_Editor.cs @@ -0,0 +1,44 @@ +using UnityEditor; +using UnityEditor.SceneManagement; + +using UnityEngine; + +namespace Passer.CreatureControl { + + [CustomEditor(typeof(Creature), true)] + public class Creature_Editor : Editor { + + protected Creature creature; + + public virtual void OnEnable() { + creature = (Creature)target; + if (creature == null) + return; + + if (!IsPrefab(creature)) + InitTargets(creature); + } + + public static bool IsPrefab(Creature creature) { + PrefabStage prefabStage = PrefabStageUtility.GetPrefabStage(creature.gameObject); + return prefabStage != null; + } + + #region Targets + + protected virtual void InitTargets(Creature creature) { + TargetsRigInspector(creature, "TargetRig"); + } + + protected void TargetsRigInspector(Creature creature, string targetRigResourceName) { + Creature.CheckTargetRig(creature, targetRigResourceName); + + if (creature.targetRig.gameObject.hideFlags != HideFlags.None) { + creature.targetRig.gameObject.hideFlags = HideFlags.None; + EditorApplication.DirtyHierarchyWindowSorting(); + } + } + } + + #endregion Targets +} \ No newline at end of file diff --git a/CreatureControl/Editor/Scripts/Creature_Editor.cs.meta b/CreatureControl/Editor/Scripts/Creature_Editor.cs.meta new file mode 100644 index 0000000..c2b14b6 --- /dev/null +++ b/CreatureControl/Editor/Scripts/Creature_Editor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e21e842527e8292c1a7002c75825bc7b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Editor/Scripts/Insect.meta b/CreatureControl/Editor/Scripts/Insect.meta new file mode 100644 index 0000000..c45a9fb --- /dev/null +++ b/CreatureControl/Editor/Scripts/Insect.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7e4dae7701b15cb018fbd090cc5c6c0b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Editor/Scripts/Insect/Insect_Editor.cs b/CreatureControl/Editor/Scripts/Insect/Insect_Editor.cs new file mode 100644 index 0000000..2868a74 --- /dev/null +++ b/CreatureControl/Editor/Scripts/Insect/Insect_Editor.cs @@ -0,0 +1,79 @@ +using UnityEditor; +using UnityEngine; + +namespace Passer.CreatureControl { + + [CustomEditor(typeof(Insect), true)] + public class Insect_Editor : Creature_Editor { + protected Insect insect; + + public override void OnEnable() { + base.OnEnable(); + + insect = target as Insect; + } + + public override void OnInspectorGUI() { + EditorGUIUtility.wideMode = true; + + serializedObject.Update(); + + SerializedProperty targetRigProp = serializedObject.FindProperty(nameof(Creature.targetRig)); + targetRigProp.objectReferenceValue = (TargetRig)EditorGUILayout.ObjectField("Target Rig", targetRigProp.objectReferenceValue, typeof(TargetRig), true); + + TargetsInspector(insect); + // EditorGUILayout.Space(); + + // SerializedProperty leftFrontLegProp = serializedObject.FindProperty(nameof(Insect.leftFrontLeg)); + // Leg_Editor.Inspector(leftFrontLegProp); + // SerializedProperty leftMiddleLegProp = serializedObject.FindProperty(nameof(Insect.leftMiddleLeg)); + // Leg_Editor.Inspector(leftMiddleLegProp); + // SerializedProperty leftHindLegProp = serializedObject.FindProperty(nameof(Insect.leftHindLeg)); + // Leg_Editor.Inspector(leftHindLegProp); + + // SerializedProperty rightFrontLegProp = serializedObject.FindProperty(nameof(Insect.rightFrontLeg)); + // Leg_Editor.Inspector(rightFrontLegProp); + // SerializedProperty rightMiddleLegProp = serializedObject.FindProperty(nameof(Insect.rightMiddleLeg)); + // Leg_Editor.Inspector(rightMiddleLegProp); + // SerializedProperty rightHindLegProp = serializedObject.FindProperty(nameof(Insect.rightHindLeg)); + // Leg_Editor.Inspector(rightHindLegProp); + + serializedObject.ApplyModifiedProperties(); + } + + static bool showTargets; + private void TargetsInspector(Insect insect) { + GUIContent text = new( + "Targets", + "The target transforms controlling the body parts" + ); + showTargets = EditorGUILayout.Foldout(showTargets, text, true); + + if (showTargets) { + EditorGUI.indentLevel++; + SerializedProperty leftFrontLegProp = serializedObject.FindProperty(nameof(Insect.leftFrontLeg)); + Leg_Editor.Inspector(leftFrontLegProp); + SerializedProperty leftMiddleLegProp = serializedObject.FindProperty(nameof(Insect.leftMiddleLeg)); + Leg_Editor.Inspector(leftMiddleLegProp); + SerializedProperty leftHindLegProp = serializedObject.FindProperty(nameof(Insect.leftHindLeg)); + Leg_Editor.Inspector(leftHindLegProp); + + SerializedProperty rightFrontLegProp = serializedObject.FindProperty(nameof(Insect.rightFrontLeg)); + Leg_Editor.Inspector(rightFrontLegProp); + SerializedProperty rightMiddleLegProp = serializedObject.FindProperty(nameof(Insect.rightMiddleLeg)); + Leg_Editor.Inspector(rightMiddleLegProp); + SerializedProperty rightHindLegProp = serializedObject.FindProperty(nameof(Insect.rightHindLeg)); + Leg_Editor.Inspector(rightHindLegProp); + + // insect.headTarget = (HeadTarget)HumanoidTarget_Editor.Inspector(insect.headTarget, "Head Target"); + // insect.leftHandTarget = (HandTarget)HandTarget_Editor.Inspector(insect.leftHandTarget, "Left Hand Target"); + // insect.rightHandTarget = (HandTarget)HandTarget_Editor.Inspector(insect.rightHandTarget, "Right Hand Target"); + // insect.hipsTarget = (HipsTarget)HumanoidTarget_Editor.Inspector(insect.hipsTarget, "Hips Target"); + // insect.leftFootTarget = (FootTarget)FootTarget_Editor.Inspector(insect.leftFootTarget, "Left Foot Target"); + // insect.rightFootTarget = (FootTarget)FootTarget_Editor.Inspector(insect.rightFootTarget, "Right Foot Target"); + EditorGUI.indentLevel--; + } + } + } + +} \ No newline at end of file diff --git a/CreatureControl/Editor/Scripts/Insect/Insect_Editor.cs.meta b/CreatureControl/Editor/Scripts/Insect/Insect_Editor.cs.meta new file mode 100644 index 0000000..d64214e --- /dev/null +++ b/CreatureControl/Editor/Scripts/Insect/Insect_Editor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fd27aa19166e492b582b506dc25eb605 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Editor/Scripts/Leg_Editor.cs b/CreatureControl/Editor/Scripts/Leg_Editor.cs new file mode 100644 index 0000000..20256d3 --- /dev/null +++ b/CreatureControl/Editor/Scripts/Leg_Editor.cs @@ -0,0 +1,75 @@ +using UnityEditor; +using UnityEngine; + +namespace Passer.CreatureControl { + + public class Leg_Editor { + //private string label = ""; + private static bool showfield = false; + + public void Enable() { + + } + + public static void Inspector(SerializedProperty legProp) { + GUIStyle foldoutStyle = new(EditorStyles.foldout) { + margin = EditorStyles.objectField.margin + }; + + EditorGUILayout.BeginHorizontal(); + string legName = ConvertCamelCase(legProp.name); + showfield = EditorGUILayout.Foldout(showfield, legName, true, foldoutStyle); + SerializedProperty femurProp = legProp.FindPropertyRelative(nameof(Leg.femur)); + SerializedProperty tibiaProp = legProp.FindPropertyRelative(nameof(Leg.tibia)); + SerializedProperty tarsusProp = legProp.FindPropertyRelative(nameof(Leg.tarsus)); + + Transform newFemur = (Transform)EditorGUILayout.ObjectField(femurProp.objectReferenceValue, typeof(Transform), true); + if (newFemur != femurProp.objectReferenceValue) { + femurProp.objectReferenceValue = newFemur; + if (newFemur != null) { + if (tibiaProp.objectReferenceValue == null && newFemur.childCount == 1) + tibiaProp.objectReferenceValue = newFemur.GetChild(0); + Transform tibia = (Transform)tibiaProp.objectReferenceValue; + if (tibia != null) { + if (tarsusProp.objectReferenceValue == null && tibia.childCount == 1) + tarsusProp.objectReferenceValue = tibia.GetChild(0); + } + } + } + EditorGUILayout.EndHorizontal(); + + if (femurProp.objectReferenceValue != null && tibiaProp.objectReferenceValue == null) + showfield = true; + + if (showfield) { + EditorGUI.indentLevel++; + tibiaProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Lower Leg", tibiaProp.objectReferenceValue, typeof(Transform), true); + tarsusProp.objectReferenceValue = (Transform)EditorGUILayout.ObjectField("Foot", tarsusProp.objectReferenceValue, typeof(Transform), true); + EditorGUI.indentLevel--; + } + } + + private static string ConvertCamelCase(string text) { + if (string.IsNullOrEmpty(text)) + return text; + + System.Text.StringBuilder result = new(); + + for (int i = 0; i < text.Length; i++) { + // Add a space before uppercase characters + if (char.IsUpper(text[i]) && i > 0) + result.Append(' '); + + // Add the character to the result + result.Append(text[i]); + } + + // Capitalize the first character of the result + if (result.Length > 0) + result[0] = char.ToUpper(result[0]); + + return result.ToString(); + } + } + +} \ No newline at end of file diff --git a/CreatureControl/Editor/Scripts/Leg_Editor.cs.meta b/CreatureControl/Editor/Scripts/Leg_Editor.cs.meta new file mode 100644 index 0000000..cffdc34 --- /dev/null +++ b/CreatureControl/Editor/Scripts/Leg_Editor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 32630932c64073f2d87d6502c6751fe1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Runtime.meta b/CreatureControl/Runtime.meta new file mode 100644 index 0000000..d3c3653 --- /dev/null +++ b/CreatureControl/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ffcfc0e0e1a219581bc4d2bb33d40bd7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Runtime/Scripts.meta b/CreatureControl/Runtime/Scripts.meta new file mode 100644 index 0000000..eb2907b --- /dev/null +++ b/CreatureControl/Runtime/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e7da2341c34bff8169b3669cc9e20463 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Runtime/Scripts/Creature.cs b/CreatureControl/Runtime/Scripts/Creature.cs new file mode 100644 index 0000000..8eec108 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/Creature.cs @@ -0,0 +1,26 @@ +using UnityEngine; + +namespace Passer.CreatureControl { + +public class Creature : MonoBehaviour { + /// The target bones rig + /// The target bones rig contain the target pose of the creature + /// The creature movements will try to move the creature such that the target pose is reached + /// as closely as possible + public TargetRig targetRig; + + /// Match the target rig transform to the humanoid transform + public static void CheckTargetRig(Creature creature, string targetRigResourceName) { + if (creature.targetRig == null) { + GameObject targetsRigPrefab = Resources.Load(targetRigResourceName); + GameObject targetRig = Instantiate(targetsRigPrefab); + targetRig.name = "Target Rig"; + + targetRig.transform.SetPositionAndRotation(creature.transform.position, creature.transform.rotation); + targetRig.transform.SetParent(creature.transform); + creature.targetRig = targetRig.GetComponent(); + } + } +} + +} \ No newline at end of file diff --git a/CreatureControl/Runtime/Scripts/Creature.cs.meta b/CreatureControl/Runtime/Scripts/Creature.cs.meta new file mode 100644 index 0000000..44458bd --- /dev/null +++ b/CreatureControl/Runtime/Scripts/Creature.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 77c2897bce0332255bd076aab62e46d9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Runtime/Scripts/Insect.meta b/CreatureControl/Runtime/Scripts/Insect.meta new file mode 100644 index 0000000..ef7c0a8 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/Insect.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 85f3225e01cd157769e2faf0e722846f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Runtime/Scripts/Insect/Insect.cs b/CreatureControl/Runtime/Scripts/Insect/Insect.cs new file mode 100644 index 0000000..44ceaaa --- /dev/null +++ b/CreatureControl/Runtime/Scripts/Insect/Insect.cs @@ -0,0 +1,13 @@ +namespace Passer.CreatureControl { + + public class Insect : Creature { + public Leg leftFrontLeg; + public Leg leftMiddleLeg; + public Leg leftHindLeg; + + public Leg rightFrontLeg; + public Leg rightMiddleLeg; + public Leg rightHindLeg; + + } +} \ No newline at end of file diff --git a/CreatureControl/Runtime/Scripts/Insect/Insect.cs.meta b/CreatureControl/Runtime/Scripts/Insect/Insect.cs.meta new file mode 100644 index 0000000..6033e51 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/Insect/Insect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01b14620016fc2bfdb8a58d81e0396a3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Runtime/Scripts/Leg.cs b/CreatureControl/Runtime/Scripts/Leg.cs new file mode 100644 index 0000000..8940f64 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/Leg.cs @@ -0,0 +1,8 @@ +using UnityEngine; + +[System.Serializable] +public class Leg { + public Transform femur; // UpperLeg, Thigh + public Transform tibia; // LowerLeg, Shank + public Transform tarsus; // Foot +} \ No newline at end of file diff --git a/CreatureControl/Runtime/Scripts/Leg.cs.meta b/CreatureControl/Runtime/Scripts/Leg.cs.meta new file mode 100644 index 0000000..e8d6baf --- /dev/null +++ b/CreatureControl/Runtime/Scripts/Leg.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 90a2688565fe3b05aba7cc9f9d70168c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Runtime/Scripts/LegTarget.cs b/CreatureControl/Runtime/Scripts/LegTarget.cs new file mode 100644 index 0000000..cf29c16 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/LegTarget.cs @@ -0,0 +1,14 @@ +using UnityEngine; + +namespace Passer.CreatureControl { + + public class LegTarget : MonoBehaviour { + public TargetLeg leg; + + public virtual void OnDrawGizmosSelected() { + if (leg != null) + leg.OnDrawGizmosSelected(); + } + } + +} \ No newline at end of file diff --git a/CreatureControl/Runtime/Scripts/LegTarget.cs.meta b/CreatureControl/Runtime/Scripts/LegTarget.cs.meta new file mode 100644 index 0000000..b1529e4 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/LegTarget.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fda62ae0dd837da8cb37ba5c7396c6a3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Runtime/Scripts/TargetLeg.cs b/CreatureControl/Runtime/Scripts/TargetLeg.cs new file mode 100644 index 0000000..8181d80 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/TargetLeg.cs @@ -0,0 +1,168 @@ +using UnityEngine; + +namespace Passer.CreatureControl { + + [System.Serializable] + public class TargetLeg : MonoBehaviour { + public Transform femurTarget; // UpperLeg, Thigh + public Transform tibiaTarget; // LowerLeg, Shank + public Transform tarsusTarget; // Foot + + public Transform target; // for the tarsus + protected LegTarget legTarget; + + public Quaternion targetToBoneFemur; + public Quaternion targetToBoneTibia; + + public virtual void OnDrawGizmosSelected() { + if (target != null && legTarget == null) { + legTarget = target.GetComponent(); + if (legTarget == null) + legTarget = target.gameObject.AddComponent(); + legTarget.leg = this; + } + + Gizmos.color = Color.white; + if (this.femurTarget != null && this.tibiaTarget != null) + Gizmos.DrawLine(this.femurTarget.position, this.tibiaTarget.position); + if (tibiaTarget != null && this.tarsusTarget != null) + Gizmos.DrawLine(this.tibiaTarget.position, this.tarsusTarget.position); + + if (this.enabled) + PoseLimb(); + } + + public void PoseLimb() { + if (target == null) + return; + + Quaternion femurOrientation = FemurRotation(target.position); + Quaternion tibiaOrientation = TibiaRotation(target.position); + Quaternion tarsusrientation = TarsusRotation(target.rotation); + + SetFemurOrientation(femurTarget, femurOrientation); + SetTibiaOrientation(tibiaTarget, tibiaOrientation); + SetTarsusOrientation(tarsusTarget, tarsusrientation); + } + + protected Quaternion FemurRotation(Vector3 targetPosition) { + if (this.femurTarget == null || this.tibiaTarget == null || this.tarsusTarget == null) + return Quaternion.identity; + + Vector3 toTarget = targetPosition - this.femurTarget.position; + // Debug.DrawRay(femur.position, toTarget, Color.magenta); + float targetDistance = toTarget.magnitude; + float femurLength = Vector3.Distance(this.femurTarget.position, this.tibiaTarget.position); + float tibiaLength = Vector3.Distance(this.tibiaTarget.position, this.tarsusTarget.position); + + float hipAngle = CosineRule(targetDistance, femurLength, tibiaLength); + // NaN happens when the distance to the footTarget is longer than the length of the leg + // We will stretch the leg full then (angle = 0) + if (float.IsNaN(hipAngle)) + hipAngle = 0; + + Quaternion femurOrientation = Quaternion.LookRotation(toTarget, Vector3.up); + femurOrientation = Quaternion.AngleAxis(hipAngle, femurOrientation * Vector3.left) * femurOrientation; + // Debug.DrawRay(femur.position, femurOrientation * Vector3.forward, Color.blue); + // Debug.DrawRay(femur.position, femurOrientation * Vector3.up, Color.green); + + return femurOrientation; + } + + protected Quaternion TibiaRotation(Vector3 targetPosition) { + if (this.tibiaTarget == null) + return Quaternion.identity; + + Vector3 directionToTarget = targetPosition - this.tibiaTarget.position; + + Quaternion tibiaOrientation = Quaternion.LookRotation(directionToTarget, Vector3.up); // femur.up); + return tibiaOrientation; // In world space + } + + protected Quaternion TarsusRotation(Quaternion targetRotation) { + return targetRotation; + } + + + private void SetFemurOrientation(Transform bone, Quaternion orientation) { + if (this.femurTarget == null) + return; + // Debug.DrawRay(femur.position, orientation * Vector3.forward, Color.blue); + // Debug.DrawRay(femur.position, orientation * Vector3.up, Color.green); + bone.rotation = orientation; + } + + private void SetTibiaOrientation(Transform bone, Quaternion orientation) { + if (this.tibiaTarget == null) + return; + + bone.rotation = orientation; + } + + private void SetTarsusOrientation(Transform bone, Quaternion orientation) { + if (this.tarsusTarget == null) + return; + + bone.rotation = orientation; + } + + + // public void MatchToCreature(Transform femurBone, Transform tibiaBone, Transform tarsusBone) { + // TargetRig.MoveTargetToBone(femurTarget, femurBone); + // TargetRig.MoveTargetToBone(tibiaTarget, tibiaBone); + // TargetRig.MoveTargetToBone(tarsusTarget, tarsusBone); + // targetToBoneFemur = TargetRig.TargetToBoneRotation(femurBone, tibiaBone); + // targetToBoneTibia = TargetRig.TargetToBoneRotation(tibiaBone, tarsusBone); + // } + public void MatchToCreature(Leg leg) { + TargetRig.MoveTargetToBone(this.femurTarget, leg.femur); + TargetRig.MoveTargetToBone(this.tibiaTarget, leg.tibia); + TargetRig.MoveTargetToBone(this.tarsusTarget, leg.tarsus); + targetToBoneFemur = TargetRig.TargetToBoneRotation(leg.femur, leg.tibia); + targetToBoneTibia = TargetRig.TargetToBoneRotation(leg.tibia, leg.tarsus); + } + + public void UpdateFemur(Transform femurBone) { + if (femurBone == null || this.femurTarget == null) + return; + + femurBone.rotation = this.femurTarget.rotation * targetToBoneFemur; + } + + public void UpdateTibia(Transform tibiaBone) { + if (tibiaBone == null || this.tibiaTarget == null) + return; + + tibiaBone.rotation = this.tibiaTarget.rotation * targetToBoneTibia; + } + + // public void UpdateBones(Transform femurBone, Transform tibiaBone) { + // UpdateFemur(femurBone); + // UpdateTibia(tibiaBone); + // } + public void UpdateBones(Leg leg) { + UpdateFemur(leg.femur); + UpdateTibia(leg.tibia); + } + + #region Math + + public static float CosineRule(float a, float b, float c) { + float a2 = a * a; + float b2 = b * b; + float c2 = c * c; + + double angle = System.Math.Acos((a2 + b2 - c2) / (2 * a * b)) * Mathf.Rad2Deg; + if (double.IsNaN(angle)) + angle = 0; + return (float)angle; + } + + private static float Square(float x) { + return x * x; + } + + #endregion Math + } + +} \ No newline at end of file diff --git a/CreatureControl/Runtime/Scripts/TargetLeg.cs.meta b/CreatureControl/Runtime/Scripts/TargetLeg.cs.meta new file mode 100644 index 0000000..a1fe7c6 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/TargetLeg.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f3394e8da3685a263901c13e2a231279 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CreatureControl/Runtime/Scripts/TargetRig.cs b/CreatureControl/Runtime/Scripts/TargetRig.cs new file mode 100644 index 0000000..cbaf349 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/TargetRig.cs @@ -0,0 +1,81 @@ +using UnityEngine; + +namespace Passer.CreatureControl { + + // An insect target rig.... + public class TargetRig : MonoBehaviour { + public TargetLeg leftFrontLeg; + public TargetLeg leftMiddleLeg; + public TargetLeg leftBackLeg; + + public TargetLeg rightFrontLeg; + public TargetLeg rightMiddleLeg; + public TargetLeg rightBackLeg; + + public Animator animator; + + public void PoseLimbs() { + leftBackLeg.PoseLimb(); + leftMiddleLeg.PoseLimb(); + leftFrontLeg.PoseLimb(); + rightBackLeg.PoseLimb(); + rightMiddleLeg.PoseLimb(); + rightFrontLeg.PoseLimb(); + } + + public void MatchTo(Insect insect) { + if (insect == null) + return; + + if (leftFrontLeg != null && insect.leftFrontLeg != null) + leftFrontLeg.MatchToCreature(insect.leftFrontLeg); + if (leftMiddleLeg != null && insect.leftMiddleLeg != null) + leftMiddleLeg.MatchToCreature(insect.leftMiddleLeg); + if (leftBackLeg != null && insect.leftHindLeg != null) + leftBackLeg.MatchToCreature(insect.leftHindLeg); + + if (rightFrontLeg != null && insect.rightFrontLeg != null) + rightFrontLeg.MatchToCreature(insect.rightFrontLeg); + if (rightMiddleLeg != null && insect.rightMiddleLeg != null) + rightMiddleLeg.MatchToCreature(insect.rightMiddleLeg); + if (rightBackLeg != null && insect.rightHindLeg != null) + rightBackLeg.MatchToCreature(insect.rightHindLeg); + } + + public static void MoveTargetToBone(Transform target, Transform bone) { + if (target == null || bone == null) + return; + + target.position = bone.position; + } + + public static Quaternion TargetToBoneRotation(Transform bone, Transform nextBone) { + if (bone == null || nextBone == null) + return Quaternion.identity; + + Vector3 direction = nextBone.position - bone.position; + Quaternion targetRotation = Quaternion.LookRotation(direction, Vector3.up); + Quaternion toBoneRotation = Quaternion.Inverse(targetRotation) * bone.rotation; + return toBoneRotation; + } + + public static Quaternion TargetToBoneRotation(Transform target, Transform nextTarget, Transform bone) { + Vector3 direction = nextTarget.position - bone.position; + Quaternion targetRotation = Quaternion.LookRotation(direction, Vector3.up); + Quaternion toBoneRotation = Quaternion.Inverse(targetRotation) * bone.rotation; + return toBoneRotation; + } + + public static Quaternion TargetToBoneRotation_Debug(Transform target, Transform nextTarget, Transform bone) { + Vector3 direction = nextTarget.position - target.position; + Quaternion targetRotation = Quaternion.LookRotation(direction, Vector3.up); + Debug.DrawRay(bone.position, targetRotation * Vector3.forward, Color.blue); + Debug.DrawRay(bone.position, targetRotation * Vector3.up, Color.green); + + Quaternion toBoneRotation = Quaternion.Inverse(targetRotation) * bone.rotation; + Debug.Log($"{targetRotation.eulerAngles} {bone.rotation.eulerAngles} -> {toBoneRotation.eulerAngles}"); + return toBoneRotation; + } + } + +} \ No newline at end of file diff --git a/CreatureControl/Runtime/Scripts/TargetRig.cs.meta b/CreatureControl/Runtime/Scripts/TargetRig.cs.meta new file mode 100644 index 0000000..4475915 --- /dev/null +++ b/CreatureControl/Runtime/Scripts/TargetRig.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a25e8575da1d1cba48dc2b8da7a2b0ab +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor.meta b/Editor.meta index d9c13b1..4e9ba5d 100644 --- a/Editor.meta +++ b/Editor.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9d715489a5eda538a959b6e4cb89d1bc +guid: 1fa9ced5c1f8d9f45b173910d53bbe81 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Editor/Scripts.meta b/Editor/Scripts.meta new file mode 100644 index 0000000..3f98ffd --- /dev/null +++ b/Editor/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3a999e12de71fa28494cf28175deb1d5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/Scripts/Ant_Editor.cs b/Editor/Scripts/Ant_Editor.cs new file mode 100644 index 0000000..6fa2170 --- /dev/null +++ b/Editor/Scripts/Ant_Editor.cs @@ -0,0 +1,22 @@ +using UnityEditor; + +namespace Passer.CreatureControl { + + [CustomEditor(typeof(Ant))] + public class Ant_Editor : Insect_Editor { + + protected Ant ant; + + public override void OnEnable() { + base.OnEnable(); + + this.ant = target as Ant; + } + + protected override void InitTargets(Creature creature) { + TargetsRigInspector(creature, "InsectTargetRig"); + creature.targetRig.MatchTo(ant); + } + } + +} \ No newline at end of file diff --git a/Editor/Scripts/Ant_Editor.cs.meta b/Editor/Scripts/Ant_Editor.cs.meta new file mode 100644 index 0000000..5bacfce --- /dev/null +++ b/Editor/Scripts/Ant_Editor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6d342503e4a28bac9aa53dca1bb602e2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain.meta b/NanoBrain.meta new file mode 100644 index 0000000..2c2f132 --- /dev/null +++ b/NanoBrain.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5f07463dfa08efc1bad0f3039a4cecc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/Cluster.cs.meta b/NanoBrain/Cluster.cs.meta index a10caff..c77fea0 100644 --- a/NanoBrain/Cluster.cs.meta +++ b/NanoBrain/Cluster.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: f13cdc4a175a9f379a00317ae68d8bea \ No newline at end of file +guid: f13cdc4a175a9f379a00317ae68d8bea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/ClusterPrefab.cs.meta b/NanoBrain/ClusterPrefab.cs.meta index ee35e0b..d8dad7a 100644 --- a/NanoBrain/ClusterPrefab.cs.meta +++ b/NanoBrain/ClusterPrefab.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 60a957541c24c57e78018c202ebb1d9b \ No newline at end of file +guid: 60a957541c24c57e78018c202ebb1d9b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/ClusterReceptor.cs.meta b/NanoBrain/ClusterReceptor.cs.meta index 027f164..e3543da 100644 --- a/NanoBrain/ClusterReceptor.cs.meta +++ b/NanoBrain/ClusterReceptor.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 4f64f5d72a422a7c8bb9ace598432aad \ No newline at end of file +guid: 4f64f5d72a422a7c8bb9ace598432aad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/Editor/BrainPickerWindow.cs.meta b/NanoBrain/Editor/BrainPickerWindow.cs.meta index b2de114..1468869 100644 --- a/NanoBrain/Editor/BrainPickerWindow.cs.meta +++ b/NanoBrain/Editor/BrainPickerWindow.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 9197e2d322d23b5798ab4aef729815b0 \ No newline at end of file +guid: 9197e2d322d23b5798ab4aef729815b0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/Editor/ClusterInspector.cs.meta b/NanoBrain/Editor/ClusterInspector.cs.meta index a1a18f5..a933254 100644 --- a/NanoBrain/Editor/ClusterInspector.cs.meta +++ b/NanoBrain/Editor/ClusterInspector.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 1fc1fb7db9f7ad54a87d31313e7f457d \ No newline at end of file +guid: 1fc1fb7db9f7ad54a87d31313e7f457d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/Editor/DAGWindow.cs.meta b/NanoBrain/Editor/DAGWindow.cs.meta index ea0ee9e..8765c5a 100644 --- a/NanoBrain/Editor/DAGWindow.cs.meta +++ b/NanoBrain/Editor/DAGWindow.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 95393aed582b8b30d965400672aec4d8 \ No newline at end of file +guid: 95393aed582b8b30d965400672aec4d8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/Editor/NanoBrain_Editor.cs.meta b/NanoBrain/Editor/NanoBrain_Editor.cs.meta index eaf830b..c91bea9 100644 --- a/NanoBrain/Editor/NanoBrain_Editor.cs.meta +++ b/NanoBrain/Editor/NanoBrain_Editor.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: f05072314d39990639a2dbf99f322664 \ No newline at end of file +guid: f05072314d39990639a2dbf99f322664 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/IReceptor.cs.meta b/NanoBrain/IReceptor.cs.meta index 0c0ee6f..446d88c 100644 --- a/NanoBrain/IReceptor.cs.meta +++ b/NanoBrain/IReceptor.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 73f052292ad16bb53a3c07aa1694c705 \ No newline at end of file +guid: 73f052292ad16bb53a3c07aa1694c705 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/LinearAlgebra/test/SphericalTest.cs b/NanoBrain/LinearAlgebra/test/SphericalTest.cs index b28b9d9..658ca04 100644 --- a/NanoBrain/LinearAlgebra/test/SphericalTest.cs +++ b/NanoBrain/LinearAlgebra/test/SphericalTest.cs @@ -1,4 +1,4 @@ -//#if !UNITY_5_6_OR_NEWER +#if !UNITY_5_6_OR_NEWER using System; using System.Collections.Generic; using NUnit.Framework; @@ -268,4 +268,4 @@ namespace LinearAlgebra.Test { } } -//#endif \ No newline at end of file +#endif \ No newline at end of file diff --git a/NanoBrain/MemoryCell.cs.meta b/NanoBrain/MemoryCell.cs.meta index ef74aba..24dc14d 100644 --- a/NanoBrain/MemoryCell.cs.meta +++ b/NanoBrain/MemoryCell.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 29633aa3fe5cd9dcc8d886051f45d4d8 \ No newline at end of file +guid: 29633aa3fe5cd9dcc8d886051f45d4d8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/NanoBrain.cs.meta b/NanoBrain/NanoBrain.cs.meta index 1666c60..fc8b1c9 100644 --- a/NanoBrain/NanoBrain.cs.meta +++ b/NanoBrain/NanoBrain.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 92f34a5e4027a1dc39efd8ce63cf6aba \ No newline at end of file +guid: 92f34a5e4027a1dc39efd8ce63cf6aba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/Neuron.cs b/NanoBrain/Neuron.cs index 05982de..3ca76c4 100644 --- a/NanoBrain/Neuron.cs +++ b/NanoBrain/Neuron.cs @@ -2,8 +2,10 @@ using System; using System.Collections.Generic; using UnityEngine; using UnityEditor; +#if UNITY_MATHEMATICS using Unity.Mathematics; using static Unity.Mathematics.math; +#endif [Serializable] public class Neuron : Nucleus { diff --git a/NanoBrain/Neuron.cs.meta b/NanoBrain/Neuron.cs.meta index e520090..37266c0 100644 --- a/NanoBrain/Neuron.cs.meta +++ b/NanoBrain/Neuron.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 750748f3f0e7d472fbf88ab02987074c \ No newline at end of file +guid: 750748f3f0e7d472fbf88ab02987074c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/Nucleus.cs.meta b/NanoBrain/Nucleus.cs.meta index 08b3cf8..0868066 100644 --- a/NanoBrain/Nucleus.cs.meta +++ b/NanoBrain/Nucleus.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 4310eea6ab77628b085387a226c1c386 \ No newline at end of file +guid: 4310eea6ab77628b085387a226c1c386 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/NucleusArray.cs.meta b/NanoBrain/NucleusArray.cs.meta index 61e26b7..b03ebae 100644 --- a/NanoBrain/NucleusArray.cs.meta +++ b/NanoBrain/NucleusArray.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: f8cac60bd79854595a8571c042f77998 \ No newline at end of file +guid: f8cac60bd79854595a8571c042f77998 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/Receptor.cs.meta b/NanoBrain/Receptor.cs.meta index 56793ae..55f0467 100644 --- a/NanoBrain/Receptor.cs.meta +++ b/NanoBrain/Receptor.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: cfb9734aebc3ab85aacf87d26fb92e55 \ No newline at end of file +guid: cfb9734aebc3ab85aacf87d26fb92e55 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NanoBrain/Synapse.cs.meta b/NanoBrain/Synapse.cs.meta index e62612c..7c45e30 100644 --- a/NanoBrain/Synapse.cs.meta +++ b/NanoBrain/Synapse.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 334a58eafccd60cbdb32f719e9e861c6 \ No newline at end of file +guid: 334a58eafccd60cbdb32f719e9e861c6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Resources.meta b/Runtime/Resources.meta new file mode 100644 index 0000000..abc4ec7 --- /dev/null +++ b/Runtime/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fd3f8dbf7199f6ffdaef4718aaaa4bb4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Resources/InsectTargetRig.prefab b/Runtime/Resources/InsectTargetRig.prefab new file mode 100644 index 0000000..ae2cbd0 --- /dev/null +++ b/Runtime/Resources/InsectTargetRig.prefab @@ -0,0 +1,765 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &217096157536176665 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8557148899078362646} + m_Layer: 0 + m_Name: RightHind_Tibia + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8557148899078362646 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 217096157536176665} + serializedVersion: 2 + m_LocalRotation: {x: 0.74910194, y: 0.00000013411044, z: -0.000000059604638, w: 0.6624548} + m_LocalPosition: {x: -0.0000000060071543, y: 0.000000016929238, z: 0.017614825} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2520372565419969361} + m_Father: {fileID: 7879963364189984297} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &469742700386237715 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2087731612450819825} + - component: {fileID: 4196034226083389076} + m_Layer: 0 + m_Name: RightMiddle_Femur + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2087731612450819825 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 469742700386237715} + serializedVersion: 2 + m_LocalRotation: {x: -0.30156508, y: 0.57948434, z: 0.24379016, w: 0.71681434} + m_LocalPosition: {x: 0.02, y: 0.04, z: -0.045} + m_LocalScale: {x: 3.4107811, y: 3.4107819, z: 3.4107828} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7566832081299524197} + m_Father: {fileID: 7044966310223004521} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &4196034226083389076 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 469742700386237715} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f3394e8da3685a263901c13e2a231279, type: 3} + m_Name: + m_EditorClassIdentifier: + femurTarget: {fileID: 2087731612450819825} + tibiaTarget: {fileID: 7566832081299524197} + tarsusTarget: {fileID: 7011186323915432702} + target: {fileID: 0} + targetToBoneFemur: {x: 0, y: 0, z: 0, w: 0} + targetToBoneTibia: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &714113386832462525 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7044966310223004521} + - component: {fileID: 5050182668285619700} + - component: {fileID: 5843436816833865534} + m_Layer: 0 + m_Name: InsectTargetRig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7044966310223004521 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 714113386832462525} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7827425323228862897} + - {fileID: 5158943779127512027} + - {fileID: 1138231466888029713} + - {fileID: 976560727556484423} + - {fileID: 2087731612450819825} + - {fileID: 7879963364189984297} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5050182668285619700 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 714113386832462525} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a25e8575da1d1cba48dc2b8da7a2b0ab, type: 3} + m_Name: + m_EditorClassIdentifier: + leftFrontLeg: {fileID: 5655676289343650514} + leftMiddleLeg: {fileID: 6327345715726789984} + leftBackLeg: {fileID: 3124099709297356894} + rightFrontLeg: {fileID: 5856460076900731150} + rightMiddleLeg: {fileID: 4196034226083389076} + rightBackLeg: {fileID: 8323677930838830493} + animator: {fileID: 5843436816833865534} +--- !u!95 &5843436816833865534 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 714113386832462525} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: d4b9f32bef604abd5953647ad53ca0f7, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 1 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 +--- !u!1 &816003872898039836 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3473835942814004862} + m_Layer: 0 + m_Name: LeftHind_Tarsus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3473835942814004862 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 816003872898039836} + serializedVersion: 2 + m_LocalRotation: {x: -0.3146679, y: 0.17643316, z: 0.007831901, w: -0.9326276} + m_LocalPosition: {x: 0.0000000016946835, y: -0.0000000055879354, z: 0.024077274} + m_LocalScale: {x: 0.9999999, y: 0.9999999, z: 0.9999999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6229249450306020558} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1193554740936415000 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 976560727556484423} + - component: {fileID: 5856460076900731150} + m_Layer: 0 + m_Name: RightFront_Femur + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &976560727556484423 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1193554740936415000} + serializedVersion: 2 + m_LocalRotation: {x: -0.17473988, y: 0.20808172, z: 0.03781085, w: 0.9616332} + m_LocalPosition: {x: 0.02, y: 0.04, z: -0.02} + m_LocalScale: {x: 3.4107826, y: 3.4107833, z: 3.410782} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3873135409852464941} + m_Father: {fileID: 7044966310223004521} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5856460076900731150 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1193554740936415000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f3394e8da3685a263901c13e2a231279, type: 3} + m_Name: + m_EditorClassIdentifier: + femurTarget: {fileID: 976560727556484423} + tibiaTarget: {fileID: 3873135409852464941} + tarsusTarget: {fileID: 3355004770557811387} + target: {fileID: 0} + targetToBoneFemur: {x: 0, y: 0, z: 0, w: 0} + targetToBoneTibia: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &1584550513300851516 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7879963364189984297} + - component: {fileID: 8323677930838830493} + m_Layer: 0 + m_Name: RightHind_Femur + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7879963364189984297 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1584550513300851516} + serializedVersion: 2 + m_LocalRotation: {x: -0.08576885, y: 0.91269386, z: 0.3088702, w: 0.25344208} + m_LocalPosition: {x: 0.02, y: 0.04, z: -0.06} + m_LocalScale: {x: 3.410783, y: 3.4107823, z: 3.4107835} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8557148899078362646} + m_Father: {fileID: 7044966310223004521} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8323677930838830493 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1584550513300851516} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f3394e8da3685a263901c13e2a231279, type: 3} + m_Name: + m_EditorClassIdentifier: + femurTarget: {fileID: 7879963364189984297} + tibiaTarget: {fileID: 8557148899078362646} + tarsusTarget: {fileID: 2520372565419969361} + target: {fileID: 0} + targetToBoneFemur: {x: 0, y: 0, z: 0, w: 0} + targetToBoneTibia: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &1864955302254048131 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5102382635668602733} + m_Layer: 0 + m_Name: LeftMiddle_Tibia + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5102382635668602733 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1864955302254048131} + serializedVersion: 2 + m_LocalRotation: {x: 0.80736995, y: 0.0000005066394, z: -0.000000059604638, w: 0.59004563} + m_LocalPosition: {x: -0.000000010239469, y: 0.0000000013652621, z: 0.014121527} + m_LocalScale: {x: 0.9999998, y: 1, z: 1.0000001} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5832494694235077857} + m_Father: {fileID: 5158943779127512027} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1915398292779927248 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2520372565419969361} + m_Layer: 0 + m_Name: RightHind_Tarsus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2520372565419969361 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1915398292779927248} + serializedVersion: 2 + m_LocalRotation: {x: -0.3146679, y: 0.17643316, z: 0.007831901, w: -0.9326276} + m_LocalPosition: {x: 0.0000000016946835, y: -0.0000000055879354, z: 0.024077274} + m_LocalScale: {x: 0.9999999, y: 0.9999999, z: 0.9999999} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8557148899078362646} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3399675694450404938 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5350519918537018444} + m_Layer: 0 + m_Name: LeftFront_Tarsus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5350519918537018444 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3399675694450404938} + serializedVersion: 2 + m_LocalRotation: {x: -0.08555651, y: 0.6380308, z: 0.42223927, w: 0.63820904} + m_LocalPosition: {x: -0.00000001637985, y: -0.0000000055879363, z: 0.017485214} + m_LocalScale: {x: 0.99999994, y: 0.99999994, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8607306932134183899} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3451781382000154612 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5832494694235077857} + m_Layer: 0 + m_Name: LeftMiddle_Tarsus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5832494694235077857 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3451781382000154612} + serializedVersion: 2 + m_LocalRotation: {x: -0.44156942, y: -0.45806083, z: -0.5668181, w: -0.5233678} + m_LocalPosition: {x: 0.000000013656518, y: 0, z: 0.024214728} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5102382635668602733} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &4305921432289450317 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3355004770557811387} + m_Layer: 0 + m_Name: RightFront_Tarsus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3355004770557811387 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4305921432289450317} + serializedVersion: 2 + m_LocalRotation: {x: -0.08555651, y: 0.6380308, z: 0.42223927, w: 0.63820904} + m_LocalPosition: {x: -0.00000001637985, y: -0.0000000055879363, z: 0.017485214} + m_LocalScale: {x: 0.99999994, y: 0.99999994, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3873135409852464941} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &5930454242050132924 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1138231466888029713} + - component: {fileID: 3124099709297356894} + m_Layer: 0 + m_Name: LeftHind_Femur + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1138231466888029713 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5930454242050132924} + serializedVersion: 2 + m_LocalRotation: {x: 0.08395476, y: 0.91604495, z: 0.27771258, w: -0.27692783} + m_LocalPosition: {x: -0.02, y: 0.04, z: -0.06} + m_LocalScale: {x: 3.4107823, y: 3.4107852, z: 3.410783} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6229249450306020558} + m_Father: {fileID: 7044966310223004521} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3124099709297356894 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5930454242050132924} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f3394e8da3685a263901c13e2a231279, type: 3} + m_Name: + m_EditorClassIdentifier: + femurTarget: {fileID: 1138231466888029713} + tibiaTarget: {fileID: 6229249450306020558} + tarsusTarget: {fileID: 3473835942814004862} + target: {fileID: 0} + targetToBoneFemur: {x: 0, y: 0, z: 0, w: 0} + targetToBoneTibia: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &6227205784071755847 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8607306932134183899} + m_Layer: 0 + m_Name: LeftFront_Tibia + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8607306932134183899 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6227205784071755847} + serializedVersion: 2 + m_LocalRotation: {x: 0.65185237, y: -0.00000028312206, z: 0.000000113621354, w: 0.7583459} + m_LocalPosition: {x: 0.000000004914944, y: -0.0000000049149436, z: 0.011160721} + m_LocalScale: {x: 1, y: 0.9999999, z: 0.99999994} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5350519918537018444} + m_Father: {fileID: 7827425323228862897} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6521710740082976927 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3873135409852464941} + m_Layer: 0 + m_Name: RightFront_Tibia + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3873135409852464941 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6521710740082976927} + serializedVersion: 2 + m_LocalRotation: {x: 0.65185237, y: -0.00000028312206, z: 0.000000113621354, w: 0.7583459} + m_LocalPosition: {x: 0.000000004914944, y: -0.0000000049149436, z: 0.011160721} + m_LocalScale: {x: 1, y: 0.9999999, z: 0.99999994} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3355004770557811387} + m_Father: {fileID: 976560727556484423} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6621691774974300190 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5158943779127512027} + - component: {fileID: 6327345715726789984} + m_Layer: 0 + m_Name: LeftMiddle_Femur + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5158943779127512027 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6621691774974300190} + serializedVersion: 2 + m_LocalRotation: {x: -0.29419467, y: -0.5819551, z: -0.23783171, w: 0.7198708} + m_LocalPosition: {x: -0.02, y: 0.04, z: -0.045} + m_LocalScale: {x: 3.410782, y: 3.410783, z: 3.4107823} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5102382635668602733} + m_Father: {fileID: 7044966310223004521} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6327345715726789984 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6621691774974300190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f3394e8da3685a263901c13e2a231279, type: 3} + m_Name: + m_EditorClassIdentifier: + femurTarget: {fileID: 5158943779127512027} + tibiaTarget: {fileID: 5102382635668602733} + tarsusTarget: {fileID: 5832494694235077857} + target: {fileID: 0} + targetToBoneFemur: {x: 0, y: 0, z: 0, w: 0} + targetToBoneTibia: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &6934656281848074513 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7011186323915432702} + m_Layer: 0 + m_Name: RightMiddle_Tarsus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7011186323915432702 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6934656281848074513} + serializedVersion: 2 + m_LocalRotation: {x: -0.44156942, y: -0.45806083, z: -0.5668181, w: -0.5233678} + m_LocalPosition: {x: 0.000000013656518, y: 0, z: 0.024214728} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7566832081299524197} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8313487703600456217 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7566832081299524197} + m_Layer: 0 + m_Name: RightMiddle_Tibia + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7566832081299524197 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8313487703600456217} + serializedVersion: 2 + m_LocalRotation: {x: 0.80736995, y: 0.0000005066394, z: -0.000000059604638, w: 0.59004563} + m_LocalPosition: {x: -0.000000010239469, y: 0.0000000013652621, z: 0.014121527} + m_LocalScale: {x: 0.9999998, y: 1, z: 1.0000001} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7011186323915432702} + m_Father: {fileID: 2087731612450819825} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8534431202702769095 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6229249450306020558} + m_Layer: 0 + m_Name: LeftHind_Tibia + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6229249450306020558 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8534431202702769095} + serializedVersion: 2 + m_LocalRotation: {x: 0.74910194, y: 0.00000013411044, z: -0.000000059604638, w: 0.6624548} + m_LocalPosition: {x: -0.0000000060071543, y: 0.000000016929238, z: 0.017614825} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3473835942814004862} + m_Father: {fileID: 1138231466888029713} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &9008164333968854526 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7827425323228862897} + - component: {fileID: 5655676289343650514} + m_Layer: 0 + m_Name: LeftFront_Femur + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7827425323228862897 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9008164333968854526} + serializedVersion: 2 + m_LocalRotation: {x: -0.16464043, y: -0.208467, z: -0.035625506, w: 0.96341366} + m_LocalPosition: {x: -0.02, y: 0.04, z: -0.02} + m_LocalScale: {x: 3.4107828, y: 3.410783, z: 3.4107833} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8607306932134183899} + m_Father: {fileID: 7044966310223004521} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5655676289343650514 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9008164333968854526} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f3394e8da3685a263901c13e2a231279, type: 3} + m_Name: + m_EditorClassIdentifier: + femurTarget: {fileID: 7827425323228862897} + tibiaTarget: {fileID: 8607306932134183899} + tarsusTarget: {fileID: 5350519918537018444} + target: {fileID: 0} + targetToBoneFemur: {x: 0, y: 0, z: 0, w: 0} + targetToBoneTibia: {x: 0, y: 0, z: 0, w: 0} diff --git a/Runtime/Resources/InsectTargetRig.prefab.meta b/Runtime/Resources/InsectTargetRig.prefab.meta new file mode 100644 index 0000000..fa552c4 --- /dev/null +++ b/Runtime/Resources/InsectTargetRig.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 587ec75114263dfb3870e4c140f45f79 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Scripts/AnimatedAnt.cs b/Runtime/Scripts/AnimatedAnt.cs deleted file mode 100644 index e6e6778..0000000 --- a/Runtime/Scripts/AnimatedAnt.cs +++ /dev/null @@ -1,245 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; - -[RequireComponent(typeof(NanoBrain))] -public class AnimatedAnt : MonoBehaviour { - private readonly float inertia = 0.2f; - private readonly float smellRadius = 1.0f; - private readonly float smellAngle = 80.0f; - - public GameObject homePheromonePrefab; - public GameObject foodPheromonePrefab; - - public AntennaTouch touchLeft; - public AntennaTouch touchRight; - - public NanoBrain nanoBrain; - // brain output - public Neuron hasFood; - // brain input - public Nucleus pheromoneSteering; - public Nucleus hitLeft; - public Nucleus hitRight; - public Nucleus beat; - public Receptor foodReceptor; - public Receptor homeReceptor; - - public new Rigidbody rigidbody; - public Animator animator; - public float forwardSpeed = 1; - public float rotationSpeed = 1; - public Vector3 linearVelocity; - public Vector3 angularVelocity; - - protected virtual void Awake() { - this.animator = GetComponentInChildren(); - if (this.animator == null && this.transform.parent != null) - this.animator = this.transform.parent.GetComponentInChildren(); - this.nanoBrain = GetComponentInChildren(); - - this.rigidbody = GetComponentInParent(); - this.rigidbody.isKinematic = false; - } - - - void Start() { - Cluster brain = this.nanoBrain.brain; - if (brain != null) { - // brain outputs - this.pheromoneSteering = brain.GetNucleus("Pheromone Steering"); - - - if (brain.GetNucleus("Home Pheromones") is Neuron homePheromones) - homePheromones.WhenFiring += PlaceHomePheromone; - if (brain.GetNucleus("Food Pheromones") is Neuron foodPheromones) - foodPheromones.WhenFiring += PlaceFoodPheromone; - - this.hasFood = brain.GetNucleus("Having Food") as Neuron; - // brain inputs - this.beat = brain.GetNucleus("Beat"); - this.hitLeft = brain.GetNucleus("Hit Left"); - this.hitRight = brain.GetNucleus("Hit Right"); - this.foodReceptor = brain.GetNucleus("Food Receptor") as Receptor; - this.homeReceptor = brain.GetNucleus("Home Receptor") as Receptor; - } - - this.linearVelocity = Vector3.forward; - - if (touchLeft != null) - touchLeft.touched += OnAntennaTouchLeft; - if (touchRight != null) - touchRight.touched += OnAntennaTouchRight; - - } - - void PlaceFoodPheromone() { - GameObject pheromoneObj = Instantiate(foodPheromonePrefab); - pheromoneObj.transform.position = this.transform.position; - } - void PlaceHomePheromone() { - GameObject pheromoneObj = Instantiate(homePheromonePrefab); - pheromoneObj.transform.position = this.transform.position; - } - - // Update is called once per frame - void Update() { - UpdateBeat(); - UpdateSmell(); - - if (this.nanoBrain == null || this.nanoBrain.brain == null || this.animator == null) - return; - - Vector3 localForce = nanoBrain.brain.defaultOutput.outputValue; - this.linearVelocity = (1 - inertia) * (Time.deltaTime * localForce.normalized) + inertia * this.linearVelocity; - this.linearVelocity = this.linearVelocity.normalized * 0.2f; - - // Vector3 linearVelocityWorld = this.transform.TransformVector(this.linearVelocity); - // this.rigidbody.linearVelocity = linearVelocityWorld; - this.animator.SetFloat("forward speed", this.linearVelocity.z * this.forwardSpeed); - - // Rotate towards the movement direction - if (this.linearVelocity != Vector3.zero) { - Quaternion targetRotation = Quaternion.LookRotation(this.linearVelocity); - Quaternion worldRotation = transform.rotation * targetRotation; - Quaternion deltaRotation = worldRotation * Quaternion.Inverse(transform.rotation); - - Vector3 eulerAngleChange = deltaRotation.eulerAngles; - // Normalize the Euler angles to avoid unexpected jumps due to 360-degree rotations - eulerAngleChange = new Vector3( - LinearAlgebra.Angles.Normalize(eulerAngleChange.x), - LinearAlgebra.Angles.Normalize(eulerAngleChange.y), - LinearAlgebra.Angles.Normalize(eulerAngleChange.z) - ); - - Vector3 angularVelocity = 5f * Mathf.Deg2Rad * eulerAngleChange; - //rigidbody.angularVelocity = angularVelocity; - this.animator.SetFloat("rotate speed", eulerAngleChange.y / 45 * this.rotationSpeed); - } - } - - public float beatInterval = 3; - float lastBeatTime = 0; - void UpdateBeat() { - if (lastBeatTime == 0) { - ulong delay = (ulong)(UnityEngine.Random.value * beatInterval); - lastBeatTime = Time.time - delay; - } - if (Time.time - lastBeatTime >= beatInterval) { - lastBeatTime = Time.time; - beat?.SetBias(Vector3.one); //, 0); - } - } - - void UpdateSmell() { - // To generate random basic movement, we add a small with a random direction with low intensity - float randomAngle = Random.Range(-smellAngle, smellAngle); - Vector3 randomDirection = Quaternion.AngleAxis(randomAngle, Vector3.up) * Vector3.forward * 0.01f; - pheromoneSteering?.SetBias(randomDirection); //, 0, "random"); - - Collider[] colliders = Physics.OverlapSphere(this.transform.position, smellRadius); - foreach (Collider collider in colliders) { - SmellPheromones(collider); - SmellFood(collider); - SmellHome(collider); - } - if (nanoBrain != null && nanoBrain.brain != null) - nanoBrain.brain.UpdateNuclei(); - } - - void SmellPheromones(Collider thing) { - Pheromone pheromone = thing.GetComponentInParent(); - if (pheromone == null) - return; - // if (hasFood == null) - // return; - - // if ((hasFood.outputValue.x > 0 && pheromone.type == Pheromone.Type.Home) || - // (hasFood.outputValue.x < 0 && pheromone.type == Pheromone.Type.Food)) { - - // Vector3 smellDirection = this.transform.InverseTransformPoint(pheromone.transform.position); - // float distance = smellDirection.magnitude; - // float angle = Vector3.Angle(Vector3.forward, smellDirection); - // if (angle < smellAngle && smellDirection.magnitude > 0.05) { - // float intensity = pheromone.StrengthAt(distance);//strength * (1 / distance); - // pheromoneSteering?.ProcessStimulus(pheromone.GetInstanceID(), smellDirection.normalized * intensity, - // pheromone.type.ToString() + " pheromone"); - // //Debug.DrawLine(this.transform.position, pheromone.transform.position, Color.magenta); - // } - // } - - Vector3 smellDirection = this.transform.InverseTransformPoint(pheromone.transform.position); - float distance = smellDirection.magnitude; - float angle = Vector3.Angle(Vector3.forward, smellDirection); - if (angle < smellAngle && smellDirection.magnitude > 0.05) { - float intensity = pheromone.StrengthAt(distance); - Vector3 smell = smellDirection.normalized * intensity; - switch (pheromone.type) { - case Pheromone.Type.Food: - //foodSmell?.ProcessStimulus(pheromone.GetInstanceID(), smell, "food pheromone"); - foodReceptor?.ProcessStimulus(smellDirection.normalized * intensity, pheromone.GetInstanceID(), "food pheromone"); - break; - case Pheromone.Type.Home: - //pheromoneSteering?.ProcessStimulus(pheromone.GetInstanceID(), smell, "home pheromone"); - //homeSmell?.ProcessStimulus(pheromone.GetInstanceID(), smell, "home pheromone"); - homeReceptor?.ProcessStimulus(smellDirection.normalized * intensity, pheromone.GetInstanceID(), "home pheromone"); - break; - } - //Debug.DrawLine(this.transform.position, pheromone.transform.position, Color.magenta); - } - - } - - void SmellFood(Collider thing) { - if (hasFood != null && hasFood.outputValue.x > 0) - // if it has food... - return; - - Food food = thing.GetComponentInParent(); - if (food == null) - return; - - Vector3 smellDirection = this.transform.InverseTransformPoint(food.transform.position); - float distance = smellDirection.magnitude; - float angle = Vector3.Angle(Vector3.forward, smellDirection); - if (angle < smellAngle && distance > 0.05) { - float intensity = food.StrengthAt(distance); //strength * (1 / distance); - //foodSmell?.ProcessStimulus(food.GetInstanceID(), smellDirection.normalized * intensity, "food"); - foodReceptor?.ProcessStimulus(smellDirection.normalized * intensity, food.GetInstanceID(), "food"); - Debug.DrawLine(this.transform.position, food.transform.position, Color.red); - } - } - - void SmellHome(Collider thing) { - if (hasFood != null && hasFood.outputValue.x < 0) - // if it does not have food.... - return; - - AntsNest nest = thing.GetComponentInParent(); - if (nest == null) - return; - - Vector3 smellDirection = this.transform.InverseTransformPoint(nest.transform.position); - float distance = smellDirection.magnitude; - float angle = Vector3.Angle(Vector3.forward, smellDirection); - if (angle < smellAngle && distance > 0.05) { - float intensity = nest.StrengthAt(distance); //strength * (1 / distance); - //homeSmell?.ProcessStimulus(nest.GetInstanceID(), smellDirection.normalized * intensity, "nest"); - Vector3 value = smellDirection.normalized * intensity; - homeReceptor?.ProcessStimulus(value, nest.GetInstanceID(), "nest"); - Debug.DrawLine(this.transform.position, nest.transform.position, Color.red); - } - } - - void OnAntennaTouchLeft(Collider other, bool isTouching) { - Vector3 touchDirection = Vector3.zero; - if (isTouching) - touchDirection = this.transform.InverseTransformVector(touchLeft.transform.forward); - hitLeft?.SetBias(touchDirection); //, other.GetInstanceID(), "Touch Left"); - } - void OnAntennaTouchRight(Collider other, bool isTouching) { - Vector3 touchDirection = Vector3.zero; - if (isTouching) - touchDirection = this.transform.InverseTransformVector(touchRight.transform.forward); - hitRight?.SetBias(touchDirection); //, other.GetInstanceID(), "Touch Right"); - } -} diff --git a/Runtime/Scripts/Ant.cs b/Runtime/Scripts/Ant.cs new file mode 100644 index 0000000..fd11334 --- /dev/null +++ b/Runtime/Scripts/Ant.cs @@ -0,0 +1,249 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Passer.CreatureControl { + + [RequireComponent(typeof(NanoBrain))] + public class Ant : Insect { + private readonly float inertia = 0.2f; + private readonly float smellRadius = 1.0f; + private readonly float smellAngle = 80.0f; + + public GameObject homePheromonePrefab; + public GameObject foodPheromonePrefab; + + public AntennaTouch touchLeft; + public AntennaTouch touchRight; + + public NanoBrain nanoBrain; + // brain output + public Neuron hasFood; + // brain input + public Nucleus pheromoneSteering; + public Nucleus hitLeft; + public Nucleus hitRight; + public Nucleus beat; + public Receptor foodReceptor; + public Receptor homeReceptor; + + public new Rigidbody rigidbody; + public Animator animator; + public float forwardSpeed = 1; + public float rotationSpeed = 1; + public Vector3 linearVelocity; + public Vector3 angularVelocity; + + protected virtual void Awake() { + this.animator = GetComponentInChildren(); + if (this.animator == null && this.transform.parent != null) + this.animator = this.transform.parent.GetComponentInChildren(); + this.nanoBrain = GetComponentInChildren(); + + this.rigidbody = GetComponentInParent(); + this.rigidbody.isKinematic = false; + } + + + void Start() { + Cluster brain = this.nanoBrain.brain; + if (brain != null) { + // brain outputs + this.pheromoneSteering = brain.GetNucleus("Pheromone Steering"); + + + if (brain.GetNucleus("Home Pheromones") is Neuron homePheromones) + homePheromones.WhenFiring += PlaceHomePheromone; + if (brain.GetNucleus("Food Pheromones") is Neuron foodPheromones) + foodPheromones.WhenFiring += PlaceFoodPheromone; + + this.hasFood = brain.GetNucleus("Having Food") as Neuron; + // brain inputs + this.beat = brain.GetNucleus("Beat"); + this.hitLeft = brain.GetNucleus("Hit Left"); + this.hitRight = brain.GetNucleus("Hit Right"); + this.foodReceptor = brain.GetNucleus("Food Receptor") as Receptor; + this.homeReceptor = brain.GetNucleus("Home Receptor") as Receptor; + } + + this.linearVelocity = Vector3.forward; + + if (touchLeft != null) + touchLeft.touched += OnAntennaTouchLeft; + if (touchRight != null) + touchRight.touched += OnAntennaTouchRight; + + } + + void PlaceFoodPheromone() { + GameObject pheromoneObj = Instantiate(foodPheromonePrefab); + pheromoneObj.transform.position = this.transform.position; + } + void PlaceHomePheromone() { + GameObject pheromoneObj = Instantiate(homePheromonePrefab); + pheromoneObj.transform.position = this.transform.position; + } + + // Update is called once per frame + void Update() { + UpdateBeat(); + UpdateSmell(); + + if (this.nanoBrain == null || this.nanoBrain.brain == null || this.animator == null) + return; + + Vector3 localForce = nanoBrain.brain.defaultOutput.outputValue; + this.linearVelocity = (1 - inertia) * (Time.deltaTime * localForce.normalized) + inertia * this.linearVelocity; + this.linearVelocity = this.linearVelocity.normalized * 0.2f; + + // Vector3 linearVelocityWorld = this.transform.TransformVector(this.linearVelocity); + // this.rigidbody.linearVelocity = linearVelocityWorld; + this.animator.SetFloat("forward speed", this.linearVelocity.z * this.forwardSpeed); + + // Rotate towards the movement direction + if (this.linearVelocity != Vector3.zero) { + Quaternion targetRotation = Quaternion.LookRotation(this.linearVelocity); + Quaternion worldRotation = transform.rotation * targetRotation; + Quaternion deltaRotation = worldRotation * Quaternion.Inverse(transform.rotation); + + Vector3 eulerAngleChange = deltaRotation.eulerAngles; + // Normalize the Euler angles to avoid unexpected jumps due to 360-degree rotations + eulerAngleChange = new Vector3( + LinearAlgebra.Angles.Normalize(eulerAngleChange.x), + LinearAlgebra.Angles.Normalize(eulerAngleChange.y), + LinearAlgebra.Angles.Normalize(eulerAngleChange.z) + ); + + Vector3 angularVelocity = 5f * Mathf.Deg2Rad * eulerAngleChange; + //rigidbody.angularVelocity = angularVelocity; + this.animator.SetFloat("rotate speed", eulerAngleChange.y / 45 * this.rotationSpeed); + } + } + + public float beatInterval = 3; + float lastBeatTime = 0; + void UpdateBeat() { + if (lastBeatTime == 0) { + ulong delay = (ulong)(UnityEngine.Random.value * beatInterval); + lastBeatTime = Time.time - delay; + } + if (Time.time - lastBeatTime >= beatInterval) { + lastBeatTime = Time.time; + beat?.SetBias(Vector3.one); //, 0); + } + } + + void UpdateSmell() { + // To generate random basic movement, we add a small with a random direction with low intensity + float randomAngle = Random.Range(-smellAngle, smellAngle); + Vector3 randomDirection = Quaternion.AngleAxis(randomAngle, Vector3.up) * Vector3.forward * 0.01f; + pheromoneSteering?.SetBias(randomDirection); //, 0, "random"); + + Collider[] colliders = Physics.OverlapSphere(this.transform.position, smellRadius); + foreach (Collider collider in colliders) { + SmellPheromones(collider); + SmellFood(collider); + SmellHome(collider); + } + if (nanoBrain != null && nanoBrain.brain != null) + nanoBrain.brain.UpdateNuclei(); + } + + void SmellPheromones(Collider thing) { + Pheromone pheromone = thing.GetComponentInParent(); + if (pheromone == null) + return; + // if (hasFood == null) + // return; + + // if ((hasFood.outputValue.x > 0 && pheromone.type == Pheromone.Type.Home) || + // (hasFood.outputValue.x < 0 && pheromone.type == Pheromone.Type.Food)) { + + // Vector3 smellDirection = this.transform.InverseTransformPoint(pheromone.transform.position); + // float distance = smellDirection.magnitude; + // float angle = Vector3.Angle(Vector3.forward, smellDirection); + // if (angle < smellAngle && smellDirection.magnitude > 0.05) { + // float intensity = pheromone.StrengthAt(distance);//strength * (1 / distance); + // pheromoneSteering?.ProcessStimulus(pheromone.GetInstanceID(), smellDirection.normalized * intensity, + // pheromone.type.ToString() + " pheromone"); + // //Debug.DrawLine(this.transform.position, pheromone.transform.position, Color.magenta); + // } + // } + + Vector3 smellDirection = this.transform.InverseTransformPoint(pheromone.transform.position); + float distance = smellDirection.magnitude; + float angle = Vector3.Angle(Vector3.forward, smellDirection); + if (angle < smellAngle && smellDirection.magnitude > 0.05) { + float intensity = pheromone.StrengthAt(distance); + Vector3 smell = smellDirection.normalized * intensity; + switch (pheromone.type) { + case Pheromone.Type.Food: + //foodSmell?.ProcessStimulus(pheromone.GetInstanceID(), smell, "food pheromone"); + foodReceptor?.ProcessStimulus(smellDirection.normalized * intensity, pheromone.GetInstanceID(), "food pheromone"); + break; + case Pheromone.Type.Home: + //pheromoneSteering?.ProcessStimulus(pheromone.GetInstanceID(), smell, "home pheromone"); + //homeSmell?.ProcessStimulus(pheromone.GetInstanceID(), smell, "home pheromone"); + homeReceptor?.ProcessStimulus(smellDirection.normalized * intensity, pheromone.GetInstanceID(), "home pheromone"); + break; + } + //Debug.DrawLine(this.transform.position, pheromone.transform.position, Color.magenta); + } + + } + + void SmellFood(Collider thing) { + if (hasFood != null && hasFood.outputValue.x > 0) + // if it has food... + return; + + Food food = thing.GetComponentInParent(); + if (food == null) + return; + + Vector3 smellDirection = this.transform.InverseTransformPoint(food.transform.position); + float distance = smellDirection.magnitude; + float angle = Vector3.Angle(Vector3.forward, smellDirection); + if (angle < smellAngle && distance > 0.05) { + float intensity = food.StrengthAt(distance); //strength * (1 / distance); + //foodSmell?.ProcessStimulus(food.GetInstanceID(), smellDirection.normalized * intensity, "food"); + foodReceptor?.ProcessStimulus(smellDirection.normalized * intensity, food.GetInstanceID(), "food"); + Debug.DrawLine(this.transform.position, food.transform.position, Color.red); + } + } + + void SmellHome(Collider thing) { + if (hasFood != null && hasFood.outputValue.x < 0) + // if it does not have food.... + return; + + AntsNest nest = thing.GetComponentInParent(); + if (nest == null) + return; + + Vector3 smellDirection = this.transform.InverseTransformPoint(nest.transform.position); + float distance = smellDirection.magnitude; + float angle = Vector3.Angle(Vector3.forward, smellDirection); + if (angle < smellAngle && distance > 0.05) { + float intensity = nest.StrengthAt(distance); //strength * (1 / distance); + //homeSmell?.ProcessStimulus(nest.GetInstanceID(), smellDirection.normalized * intensity, "nest"); + Vector3 value = smellDirection.normalized * intensity; + homeReceptor?.ProcessStimulus(value, nest.GetInstanceID(), "nest"); + Debug.DrawLine(this.transform.position, nest.transform.position, Color.red); + } + } + + void OnAntennaTouchLeft(Collider other, bool isTouching) { + Vector3 touchDirection = Vector3.zero; + if (isTouching) + touchDirection = this.transform.InverseTransformVector(touchLeft.transform.forward); + hitLeft?.SetBias(touchDirection); //, other.GetInstanceID(), "Touch Left"); + } + void OnAntennaTouchRight(Collider other, bool isTouching) { + Vector3 touchDirection = Vector3.zero; + if (isTouching) + touchDirection = this.transform.InverseTransformVector(touchRight.transform.forward); + hitRight?.SetBias(touchDirection); //, other.GetInstanceID(), "Touch Right"); + } + } + +} \ No newline at end of file diff --git a/Runtime/Scripts/AnimatedAnt.cs.meta b/Runtime/Scripts/Ant.cs.meta similarity index 100% rename from Runtime/Scripts/AnimatedAnt.cs.meta rename to Runtime/Scripts/Ant.cs.meta diff --git a/Runtime/Scripts/AntsNest.cs b/Runtime/Scripts/AntsNest.cs index 64a3d0c..3838c25 100644 --- a/Runtime/Scripts/AntsNest.cs +++ b/Runtime/Scripts/AntsNest.cs @@ -1,32 +1,36 @@ using System.Collections; using UnityEngine; -public class AntsNest : Odorant { +namespace Passer.CreatureControl { - public Ant antPrefab; - public uint numberOfAnts = 1; - public bool spawnAnt = false; + public class AntsNest : Odorant { - private uint antCount = 0; - protected virtual void Start() { - StartCoroutine(SpawnAnts()); - } - IEnumerator SpawnAnts() { - while (numberOfAnts > 0) { - Ant ant = Instantiate(antPrefab); - ant.transform.eulerAngles = 360 * Random.value * Vector3.up; - ant.transform.position = this.transform.position + ant.transform.forward * 0.1F; - ant.name = "Ant " + (++antCount); - numberOfAnts--; - yield return new WaitForSeconds(0.2f); + public Ant antPrefab; + public uint numberOfAnts = 1; + public bool spawnAnt = false; + + private uint antCount = 0; + protected virtual void Start() { + StartCoroutine(SpawnAnts()); + } + IEnumerator SpawnAnts() { + while (numberOfAnts > 0) { + Ant ant = Instantiate(antPrefab); + ant.transform.eulerAngles = 360 * Random.value * Vector3.up; + ant.transform.position = this.transform.position + ant.transform.forward * 0.1F; + ant.name = "Ant " + (++antCount); + numberOfAnts--; + yield return new WaitForSeconds(0.2f); + } + } + + protected virtual void Update() { + if (spawnAnt) { + Ant ant = Instantiate(antPrefab); + ant.name = "Ant " + (++antCount); + spawnAnt = false; + } } } - protected virtual void Update() { - if (spawnAnt) { - Ant ant = Instantiate(antPrefab); - ant.name = "Ant " + (++antCount); - spawnAnt = false; - } - } -} +} \ No newline at end of file diff --git a/Runtime/Scripts/Mouth.cs b/Runtime/Scripts/Mouth.cs index a05de44..fcf836c 100644 --- a/Runtime/Scripts/Mouth.cs +++ b/Runtime/Scripts/Mouth.cs @@ -1,64 +1,68 @@ using System.Collections.Generic; using UnityEngine; -public class Mouth : MonoBehaviour { - public GameObject foodPrefab; - public NanoBrain nanoBrain; +namespace Passer.CreatureControl { - public Neuron havingFood; - public Nucleus enableFoodPheromones; + public class Mouth : MonoBehaviour { + public GameObject foodPrefab; + public NanoBrain nanoBrain; - void Awake() { - this.nanoBrain = GetComponentInParent(); - if (this.nanoBrain == null || this.nanoBrain.brain == null) - return; - - if (nanoBrain.brain.GetNucleus("Mouth") is Neuron mouthNeuron) - mouthNeuron.WhenFiring += CheckGrab; - this.havingFood = nanoBrain.brain.GetNucleus("Having Food") as Neuron; - } + public Neuron havingFood; + public Nucleus enableFoodPheromones; - void Start() { - havingFood?.SetBias(-Vector3.one); - } + void Awake() { + this.nanoBrain = GetComponentInParent(); + if (this.nanoBrain == null || this.nanoBrain.brain == null) + return; - protected void CheckGrab() { - if (havingFood == null) - return; - Collider[] colliders = Physics.OverlapSphere(this.transform.position, 0.04f); - foreach (Collider c in colliders) { - if (havingFood.outputValue.x > 0) { - AntsNest nest = c.GetComponentInParent(); - if (nest != null) - LetGo(); - } - else { - Food food = c.GetComponentInParent(); - if (food != null) - Grab(); + if (nanoBrain.brain.GetNucleus("Mouth") is Neuron mouthNeuron) + mouthNeuron.WhenFiring += CheckGrab; + this.havingFood = nanoBrain.brain.GetNucleus("Having Food") as Neuron; + } + + void Start() { + havingFood?.SetBias(-Vector3.one); + } + + protected void CheckGrab() { + if (havingFood == null) + return; + Collider[] colliders = Physics.OverlapSphere(this.transform.position, 0.04f); + foreach (Collider c in colliders) { + if (havingFood.outputValue.x > 0) { + AntsNest nest = c.GetComponentInParent(); + if (nest != null) + LetGo(); + } + else { + Food food = c.GetComponentInParent(); + if (food != null) + Grab(); + } } } + + public bool Grab() { + //Debug.Log($"{this.transform.parent.name} Grab food"); + havingFood?.SetBias(Vector3.one); + GameObject food = Instantiate(foodPrefab); + + food.transform.SetParent(this.transform, false); + food.transform.localPosition = Vector3.zero; + return true; + } + + public void LetGo() { + //Debug.Log($"{this.transform.parent.name} Release food"); + + List toDelete = new(); + for (int i = 0; i < transform.childCount; i++) + toDelete.Add(transform.GetChild(i).gameObject); + foreach (GameObject go in toDelete) + Destroy(go); + + havingFood?.SetBias(-Vector3.one); + } } - public bool Grab() { - //Debug.Log($"{this.transform.parent.name} Grab food"); - havingFood?.SetBias(Vector3.one); - GameObject food = Instantiate(foodPrefab); - - food.transform.SetParent(this.transform, false); - food.transform.localPosition = Vector3.zero; - return true; - } - - public void LetGo() { - //Debug.Log($"{this.transform.parent.name} Release food"); - - List toDelete = new(); - for (int i = 0; i < transform.childCount; i++) - toDelete.Add(transform.GetChild(i).gameObject); - foreach (GameObject go in toDelete) - Destroy(go); - - havingFood?.SetBias(-Vector3.one); - } -} +} \ No newline at end of file