Jordan 1 year ago
parent
commit
12384526ea
18 changed files with 979 additions and 27 deletions
  1. +8
    -0
      Assets/Art Assets/Animation.meta
  2. +73
    -0
      Assets/Art Assets/Animation/FregController.controller
  3. +8
    -0
      Assets/Art Assets/Animation/FregController.controller.meta
  4. +701
    -9
      Assets/Art Assets/Models/Freg_T-Pose.fbx.meta
  5. BIN
      Assets/Prefab/Player.prefab
  6. BIN
      Assets/Scenes/BoatTest.unity
  7. BIN
      Assets/Scenes/Development/CharacterControllerTest.unity
  8. BIN
      Assets/Scenes/Development/OarVelocityController.unity
  9. +7
    -0
      Assets/Scenes/Development/OarVelocityController.unity.meta
  10. +1
    -1
      Assets/Scripts/BoatController.cs
  11. +43
    -8
      Assets/Scripts/Player/BoatRowController.cs
  12. +17
    -1
      Assets/Scripts/Player/HandController.cs
  13. +99
    -0
      Assets/Scripts/Player/IkController.cs
  14. +11
    -0
      Assets/Scripts/Player/IkController.cs.meta
  15. +0
    -0
      Assets/Scripts/Utility.meta
  16. +0
    -0
      Assets/Scripts/Utility/CopyTransform.cs
  17. +0
    -0
      Assets/Scripts/Utility/CopyTransform.cs.meta
  18. BIN
      ProjectSettings/ShaderGraphSettings.asset

+ 8
- 0
Assets/Art Assets/Animation.meta View File

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

+ 73
- 0
Assets/Art Assets/Animation/FregController.controller View File

@ -0,0 +1,73 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1102 &-7947158109147835962
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: T_pose
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
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: -203655887218126122, guid: 63c6c6ecfa3ccf943a834cceca0f6eab,
type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &-4407937962629104252
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: -7947158109147835962}
m_Position: {x: 312, y: 202, 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: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -7947158109147835962}
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: FregController
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -4407937962629104252}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 1
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}

+ 8
- 0
Assets/Art Assets/Animation/FregController.controller.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e1f75726e8d22ba40ba8029c79bcf59f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

+ 701
- 9
Assets/Art Assets/Models/Freg_T-Pose.fbx.meta View File

@ -24,18 +24,47 @@ ModelImporter:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationCompression: 3
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
clipAnimations:
- serializedVersion: 16
name: T_pose
takeName: mixamo.com
internalID: -203655887218126122
firstFrame: 0
lastFrame: 1
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 0
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000000000000000000000000000000000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
globalScale: 0.17
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
@ -79,23 +108,686 @@ ModelImporter:
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
human:
- boneName: mixamorig:Hips
humanName: Hips
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftUpLeg
humanName: LeftUpperLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightUpLeg
humanName: RightUpperLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftLeg
humanName: LeftLowerLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightLeg
humanName: RightLowerLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftFoot
humanName: LeftFoot
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightFoot
humanName: RightFoot
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:Spine
humanName: Spine
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:Spine1
humanName: Chest
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:Neck
humanName: Neck
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:Head
humanName: Head
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftShoulder
humanName: LeftShoulder
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightShoulder
humanName: RightShoulder
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftArm
humanName: LeftUpperArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightArm
humanName: RightUpperArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftForeArm
humanName: LeftLowerArm
limit:
min: {x: -90, y: 0, z: -80}
max: {x: 90, y: 0, z: 80}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 1
- boneName: mixamorig:RightForeArm
humanName: RightLowerArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHand
humanName: LeftHand
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHand
humanName: RightHand
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftToeBase
humanName: LeftToes
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightToeBase
humanName: RightToes
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandThumb1
humanName: Left Thumb Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandThumb2
humanName: Left Thumb Intermediate
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandThumb3
humanName: Left Thumb Distal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandIndex1
humanName: Left Index Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandIndex2
humanName: Left Index Intermediate
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandIndex3
humanName: Left Index Distal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandMiddle1
humanName: Left Middle Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandMiddle2
humanName: Left Middle Intermediate
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandMiddle3
humanName: Left Middle Distal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandRing1
humanName: Left Ring Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandRing2
humanName: Left Ring Intermediate
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:LeftHandRing3
humanName: Left Ring Distal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandThumb1
humanName: Right Thumb Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandThumb2
humanName: Right Thumb Intermediate
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandThumb3
humanName: Right Thumb Distal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandIndex1
humanName: Right Index Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandIndex2
humanName: Right Index Intermediate
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandIndex3
humanName: Right Index Distal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandMiddle1
humanName: Right Middle Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandMiddle2
humanName: Right Middle Intermediate
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandMiddle3
humanName: Right Middle Distal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandRing1
humanName: Right Ring Proximal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandRing2
humanName: Right Ring Intermediate
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:RightHandRing3
humanName: Right Ring Distal
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: mixamorig:Spine2
humanName: UpperChest
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
skeleton:
- name: Freg_T-Pose(Clone)
parentName:
position: {x: 0, y: 0, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: Freg
parentName: Freg_T-Pose(Clone)
position: {x: -0, y: 0, z: 0}
rotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071067}
scale: {x: 100, y: 100, z: 100}
- name: mixamorig:Hips
parentName: Freg_T-Pose(Clone)
position: {x: -0.000000102896145, y: 1.6609266, z: -0.0018054076}
rotation: {x: 1.10861834e-10, y: -0.00000002152418, z: 0.0000007499091, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:Spine
parentName: mixamorig:Hips
position: {x: -0, y: 0.123161286, z: -0.011139075}
rotation: {x: -0.045083504, y: 0.00000005531034, z: -0.00000074817723, w: 0.99898326}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:Spine1
parentName: mixamorig:Spine
position: {x: -0, y: 0.14427468, z: 1.7768176e-10}
rotation: {x: 7.018601e-26, y: -1.0390106e-13, z: 6.755081e-13, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:Spine2
parentName: mixamorig:Spine1
position: {x: -0, y: 0.16488506, z: -2.4558364e-10}
rotation: {x: 0, y: -0, z: -1.4988356e-29, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:Neck
parentName: mixamorig:Spine2
position: {x: -0, y: 0.1854958, z: 0.000000025045633}
rotation: {x: 0.045083612, y: 3.233916e-14, z: 2.2906452e-13, w: 0.99898326}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:Head
parentName: mixamorig:Neck
position: {x: -0, y: 0.22998667, z: 0.01052102}
rotation: {x: 0, y: -0, z: -6.794357e-36, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:HeadTop_End
parentName: mixamorig:Head
position: {x: -0, y: 0.57105625, z: 0.026123662}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightShoulder
parentName: mixamorig:Spine2
position: {x: 0.11822756, y: 0.17456128, z: -0.0016091992}
rotation: {x: 0.48438, y: 0.5146479, z: -0.48473686, w: 0.51530945}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightArm
parentName: mixamorig:RightShoulder
position: {x: -3.226581e-11, y: 0.23750229, z: -1.3496536e-10}
rotation: {x: 0.030386982, y: 0.03824031, z: 0.0009954084, w: 0.99880594}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightForeArm
parentName: mixamorig:RightArm
position: {x: 2.858576e-10, y: 0.5169594, z: 0.0000000067340404}
rotation: {x: 0.000000036448416, y: 0.00002214491, z: 0.00000020349222, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHand
parentName: mixamorig:RightForeArm
position: {x: -1.3463869e-12, y: 0.56330055, z: 0.0000000023139064}
rotation: {x: -0.025483876, y: 0.0050663436, z: 0.0010220521, w: 0.99966186}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandIndex1
parentName: mixamorig:RightHand
position: {x: -0.043221526, y: 0.09376483, z: 0.00087934243}
rotation: {x: 0.025488509, y: 0.0001179746, z: 0.0010658845, w: 0.99967456}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandIndex2
parentName: mixamorig:RightHandIndex1
position: {x: 0.0004327134, y: 0.11062384, z: 0.000000003784188}
rotation: {x: 0.00000014747906, y: 0.00016152766, z: -0.002870189, w: 0.9999959}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandIndex3
parentName: mixamorig:RightHandIndex2
position: {x: -0.00018019667, y: 0.09850783, z: -0.0000000052194844}
rotation: {x: 0.00000028781594, y: -0.000075062686, z: -0.000545697, w: 0.9999999}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandIndex4
parentName: mixamorig:RightHandIndex3
position: {x: -0.00025251528, y: 0.08643244, z: 8.854146e-10}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandMiddle1
parentName: mixamorig:RightHand
position: {x: 0.00016771068, y: 0.09385455, z: 0.00478913}
rotation: {x: 0.025488157, y: 0.00010997656, z: -0.0017973452, w: 0.99967355}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandMiddle2
parentName: mixamorig:RightHandMiddle1
position: {x: -0.00019988108, y: 0.11022704, z: 0.0000000032219314}
rotation: {x: -0.00000015312436, y: -0.00010129575, z: 0.0012558104, w: 0.9999992}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandMiddle3
parentName: mixamorig:RightHandMiddle2
position: {x: 0.00007054719, y: 0.10112934, z: -9.933717e-10}
rotation: {x: 0.00000035540253, y: 0.000063089814, z: 0.00039491084, w: 0.99999994}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandMiddle4
parentName: mixamorig:RightHandMiddle3
position: {x: 0.00012933392, y: 0.08696552, z: 0.0000000012471244}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandRing1
parentName: mixamorig:RightHand
position: {x: 0.043053813, y: 0.08617251, z: 0.00030594948}
rotation: {x: 0.02548902, y: -0.0003455956, z: -0.004140899, w: 0.99966645}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandRing2
parentName: mixamorig:RightHandRing1
position: {x: -0.0007493473, y: 0.1157149, z: 0.000000010468865}
rotation: {x: 0.00000033538743, y: -0.00032235464, z: 0.0042382437, w: 0.999991}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandRing3
parentName: mixamorig:RightHandRing2
position: {x: 0.00020480058, y: 0.10240191, z: 0.000000004206175}
rotation: {x: 0.0000013790376, y: 0.00030103352, z: 0.0021116615, w: 0.99999774}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandRing4
parentName: mixamorig:RightHandRing3
position: {x: 0.0005445452, y: 0.08748255, z: 5.5972604e-10}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandThumb1
parentName: mixamorig:RightHand
position: {x: -0.0435905, y: 0.05746552, z: -0.00142744}
rotation: {x: 0.087615564, y: 0.007940574, z: 0.40449876, w: 0.91029733}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandThumb2
parentName: mixamorig:RightHandThumb1
position: {x: 0.0068740644, y: 0.057302702, z: 1.7928549e-10}
rotation: {x: 0.000002866269, y: -0.00016101592, z: -0.13705553, w: 0.9905634}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandThumb3
parentName: mixamorig:RightHandThumb2
position: {x: -0.01423339, y: 0.09074358, z: 0.0000000012088461}
rotation: {x: -0.000044853146, y: 0.001245363, z: 0.1194256, w: 0.9928424}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightHandThumb4
parentName: mixamorig:RightHandThumb3
position: {x: 0.0073593305, y: 0.08757491, z: -0.000000004206849}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftShoulder
parentName: mixamorig:Spine2
position: {x: -0.11822756, y: 0.17445, z: -0.00037873464}
rotation: {x: 0.48752636, y: -0.51214236, z: 0.48207942, w: 0.5173275}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftArm
parentName: mixamorig:LeftShoulder
position: {x: -7.422081e-12, y: 0.23750229, z: -1.3857018e-10}
rotation: {x: 0.030164793, y: -0.050302494, z: 0.0037984836, w: 0.99827117}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftForeArm
parentName: mixamorig:LeftArm
position: {x: -8.5651444e-11, y: 0.5169542, z: -0.0000000067278396}
rotation: {x: -0.00000015776874, y: -0.000054749627, z: -0.00000001786266, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHand
parentName: mixamorig:LeftForeArm
position: {x: 1.2652455e-10, y: 0.56328917, z: 0.0000000032289906}
rotation: {x: 0.017183997, y: 0.0025659509, z: -0.0107588805, w: 0.9997912}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandIndex1
parentName: mixamorig:LeftHand
position: {x: 0.045861457, y: 0.095392264, z: 0.0020760978}
rotation: {x: -0.017218854, y: 0.0006020723, z: 0.009020056, w: 0.9998109}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandIndex2
parentName: mixamorig:LeftHandIndex1
position: {x: -0.00035675758, y: 0.10594783, z: -0.0000000038555017}
rotation: {x: 0.0000002010197, y: -0.00017040034, z: 0.002160759, w: 0.9999977}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandIndex3
parentName: mixamorig:LeftHandIndex2
position: {x: 0.00009746085, y: 0.102173395, z: 0.0000000030582026}
rotation: {x: -0.000000057950903, y: 0.00016423328, z: 0.0010220724, w: 0.99999946}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandIndex4
parentName: mixamorig:LeftHandIndex3
position: {x: 0.00025929834, y: 0.08648212, z: 7.095787e-10}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandMiddle1
parentName: mixamorig:LeftHand
position: {x: -0.0020108602, y: 0.09378127, z: -0.003230106}
rotation: {x: -0.017208388, y: -0.00021214575, z: 0.01113024, w: 0.99978995}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandMiddle2
parentName: mixamorig:LeftHandMiddle1
position: {x: 0.000088439905, y: 0.107404545, z: -0.0000000043620627}
rotation: {x: -0.00000023261757, y: 0.000030042233, z: -0.00059080124, w: 0.9999998}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandMiddle3
parentName: mixamorig:LeftHandMiddle2
position: {x: -0.000035507004, y: 0.0990798, z: -0.000000003198235}
rotation: {x: 0.0000001296454, y: 0.000012546951, z: -0.00013962385, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandMiddle4
parentName: mixamorig:LeftHandMiddle3
position: {x: -0.000052932857, y: 0.08291154, z: 0.0000000038994408}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandRing1
parentName: mixamorig:LeftHand
position: {x: -0.043850597, y: 0.0878519, z: 0.0028484527}
rotation: {x: -0.017197065, y: -0.0018524512, z: 0.013962409, w: 0.99975294}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandRing2
parentName: mixamorig:LeftHandRing1
position: {x: 0.0007312821, y: 0.11371003, z: 0.0000000050498534}
rotation: {x: 0.00000086448256, y: 0.00030248676, z: -0.0044981623, w: 0.99998987}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandRing3
parentName: mixamorig:LeftHandRing2
position: {x: -0.00025916673, y: 0.10108424, z: 0.0000000015748618}
rotation: {x: 0.0000010129552, y: -0.00021025403, z: -0.0014042362, w: 0.999999}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandRing4
parentName: mixamorig:LeftHandRing3
position: {x: -0.0004721146, y: 0.08785986, z: -8.1122736e-10}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandThumb1
parentName: mixamorig:LeftHand
position: {x: 0.042163435, y: 0.0577421, z: 0.00080182165}
rotation: {x: 0.051420353, y: -0.0036998703, z: -0.40421388, w: 0.9132105}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandThumb2
parentName: mixamorig:LeftHandThumb1
position: {x: -0.008024691, y: 0.056636013, z: 8.8417085e-10}
rotation: {x: 0.000000016215065, y: 0.000008732834, z: 0.13974327, w: 0.99018776}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandThumb3
parentName: mixamorig:LeftHandThumb2
position: {x: 0.012851872, y: 0.09142811, z: -0.0000000017963245}
rotation: {x: 0.00011301527, y: 0.0025927569, z: -0.09600683, w: 0.9953773}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftHandThumb4
parentName: mixamorig:LeftHandThumb3
position: {x: -0.004827185, y: 0.091585144, z: -0.0000000054228075}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightUpLeg
parentName: mixamorig:Hips
position: {x: 0.16960973, y: -0.06853022, z: -0.0026564335}
rotation: {x: -0.0000034893098, y: -0.008072721, z: 0.9999673, w: -0.00062096445}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightLeg
parentName: mixamorig:RightUpLeg
position: {x: 2.1349068e-11, y: 0.8158371, z: -8.733406e-10}
rotation: {x: -0.013996192, y: 0.000042008713, z: -0.0013579024, w: 0.9999011}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightFoot
parentName: mixamorig:RightLeg
position: {x: -2.0847563e-11, y: 0.68990165, z: 3.1174127e-10}
rotation: {x: 0.5772244, y: 0.008130766, z: -0.0052172826, w: 0.8165285}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightToeBase
parentName: mixamorig:RightFoot
position: {x: 2.0368637e-10, y: 0.20748112, z: -0.000000003222405}
rotation: {x: 0.1660197, y: 0.0016160661, z: 0.009598631, w: 0.98607445}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:RightToe_End
parentName: mixamorig:RightToeBase
position: {x: -2.3711526e-13, y: 0.08078485, z: -3.0264846e-11}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftUpLeg
parentName: mixamorig:Hips
position: {x: -0.16960973, y: -0.06853022, z: -0.0026061977}
rotation: {x: 0.000004058711, y: -0.008713514, z: 0.99996185, w: 0.00062257284}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftLeg
parentName: mixamorig:LeftUpLeg
position: {x: 1.0914332e-11, y: 0.8158181, z: 4.4208825e-10}
rotation: {x: -0.01263206, y: -0.0000399247, z: 0.0013578712, w: 0.9999193}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftFoot
parentName: mixamorig:LeftLeg
position: {x: -4.2300243e-12, y: 0.6898943, z: 5.53216e-11}
rotation: {x: 0.5780523, y: -0.008047839, z: 0.005178282, w: 0.8159436}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftToeBase
parentName: mixamorig:LeftFoot
position: {x: -4.5480633e-11, y: 0.20928061, z: -0.0000000028510687}
rotation: {x: 0.16457075, y: -0.0015851569, z: -0.009500289, w: 0.9863183}
scale: {x: 1, y: 1, z: 1}
- name: mixamorig:LeftToe_End
parentName: mixamorig:LeftToeBase
position: {x: -3.9693305e-12, y: 0.0816462, z: -6.7363636e-11}
rotation: {x: 0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 1, z: 1}
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
armStretch: 1
legStretch: 0.05
feetSpacing: 0
globalScale: 1
globalScale: 0.17
rootMotionBoneName: mixamorig:Hips
hasTranslationDoF: 0
hasExtraRoot: 0
hasExtraRoot: 1
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
animationType: 3
humanoidOversampling: 1
avatarSetup: 1
addHumanoidExtraRootOnlyWhenUsingAvatar: 1

BIN
Assets/Prefab/Player.prefab (Stored with Git LFS) View File

size 37002

BIN
Assets/Scenes/BoatTest.unity (Stored with Git LFS) View File

size 54197

BIN
Assets/Scenes/Development/CharacterControllerTest.unity (Stored with Git LFS) View File

size 13380

BIN
Assets/Scenes/Development/OarVelocityController.unity (Stored with Git LFS) View File

size 89254

+ 7
- 0
Assets/Scenes/Development/OarVelocityController.unity.meta View File

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

+ 1
- 1
Assets/Scripts/BoatController.cs View File

@ -83,7 +83,7 @@ public class BoatController : MonoBehaviour
public void RowRight(float velocity)
{
rigidBody.AddForce(transform.forward * ForwardFactor * velocity, ForceMode.Acceleration);
rigidBody.AddTorque(transform.up * -RotationFactor * velocity);
rigidBody.AddTorque(transform.up * RotationFactor * velocity);
}
public void Brake()

+ 43
- 8
Assets/Scripts/Player/BoatRowController.cs View File

@ -13,11 +13,15 @@ public class BoatRowController : MonoBehaviour
#region Inspector Fields
public Transform m_oarTip;
public UnityEvent m_OnRow;
public UnityEvent<float> m_OnRow;
public UnityEvent m_OnBrake;
public int velocityOverFrames = 8;
#endregion Inspector Fields
#region Private Fields
private Vector3 m_lastKnownOarPosition;
private Queue<float> m_velocityQueue = new Queue<float>();
#endregion Private Fields
#region Getters
@ -60,7 +64,8 @@ public class BoatRowController : MonoBehaviour
OarController oar = other.GetComponentInParent<OarController>();
if (oar != null)
{
m_lastKnownOarPosition = m_oarTip.localPosition;
m_lastKnownOarPosition = transform.InverseTransformPoint(m_oarTip.position);
m_velocityQueue = new Queue<float>();
}
}
@ -69,20 +74,50 @@ public class BoatRowController : MonoBehaviour
OarController oar = other.GetComponentInParent<OarController>();
if(oar != null)
{
Vector3 direction = m_lastKnownOarPosition - m_oarTip.localPosition;
Vector3 localOarTipPosition = transform.InverseTransformPoint(m_oarTip.position);
Vector3 direction = m_lastKnownOarPosition - localOarTipPosition;
float directionality = Vector3.Dot(direction,Vector3.forward);
if (directionality > 0)
m_velocityQueue.Enqueue(directionality * Time.deltaTime);
if(m_velocityQueue.Count > velocityOverFrames)
{
m_velocityQueue.Dequeue();
}
float averageVelocity = 0;
if (m_velocityQueue.Count > 0)
{
var v_arr = m_velocityQueue.ToArray();
for(int i = 0; i < v_arr.Length; i++)
{
averageVelocity += v_arr[i];
}
averageVelocity /= v_arr.Length;
}
if (averageVelocity > 0)
{
Debug.Log($"Row! ({directionality})");
m_OnRow.Invoke();
if(averageVelocity < 0.000001)
{
m_OnBrake.Invoke();
Debug.Log($"Brake! ({averageVelocity})");
}
else
{
Debug.Log($"Row! ({averageVelocity})");
m_OnRow.Invoke(averageVelocity);
}
}
else
{
Debug.Log($"No Row: {directionality}");
Debug.Log($"No Row: {averageVelocity}");
m_OnBrake.Invoke();
}
m_lastKnownOarPosition=m_oarTip.localPosition;
m_lastKnownOarPosition = localOarTipPosition;
}
else
{

+ 17
- 1
Assets/Scripts/Player/HandController.cs View File

@ -34,7 +34,14 @@ public class HandController : MonoBehaviour
private float m_armSpeed = 0.5f;
[SerializeField, BoxGroup("Settings")]
private Vector2 m_startInput = new Vector2(0, 1);
private Vector2 m_startInput = new Vector2(0, 1);
[SerializeField]
private Vector3 m_IKOffset = new Vector3(0, 0, 0.05f);
[SerializeField]
private Quaternion m_IKRotationOffset;
[SerializeField, BoxGroup("Input")]
private InputActionProperty m_inputAxis;
@ -100,6 +107,15 @@ public class HandController : MonoBehaviour
//UpdateHand(m_desiredInput);
}
public Vector3 GetIKPosition()
{
return transform.position + transform.TransformDirection(m_IKOffset);
}
public Quaternion GetIKRotation()
{
return m_oar.transform.rotation * m_IKRotationOffset;
}
#endregion MonoBehaviour Functions
#region Class Functionality

+ 99
- 0
Assets/Scripts/Player/IkController.cs View File

@ -0,0 +1,99 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using NaughtyAttributes;
/// <summary>
///
/// </summary>
public class IkController : MonoBehaviour
{
#region Inspector Fields
[SerializeField, BoxGroup("References")]
private HandController m_leftHandTarget, m_rightHandTarget;
[SerializeField, BoxGroup("References")]
private Animator m_animator;
[SerializeField, BoxGroup("Settings"),Range(0,1)]
public float IKWeight = 1;
#endregion Inspector Fields
#region Private Fields
#endregion Private Fields
#region Getters
#endregion Getters
#region MonoBehaviour Functions
/// <summary>
/// OnEnable is called when the object becomes enabled and active.
/// </summary>
private void OnEnable()
{
}
/// <summary>
/// OnDisable is called when the behaviour becomes disabled.
/// </summary>
private void OnDisable()
{
}
/// <summary>
/// Update is called once per frame
/// </summary>
private void Update()
{
}
//a callback for calculating IK
void OnAnimatorIK()
{
if (m_animator)
{
m_animator.SetIKPositionWeight(AvatarIKGoal.LeftHand, 1);
m_animator.SetIKRotationWeight(AvatarIKGoal.LeftHand, 1);
m_animator.SetIKPosition(AvatarIKGoal.LeftHand, m_leftHandTarget.GetIKPosition());
m_animator.SetIKRotation(AvatarIKGoal.LeftHand, m_leftHandTarget.GetIKRotation());
m_animator.SetIKPositionWeight(AvatarIKGoal.RightHand, 1);
m_animator.SetIKRotationWeight(AvatarIKGoal.RightHand, 1);
m_animator.SetIKPosition(AvatarIKGoal.RightHand, m_rightHandTarget.GetIKPosition());
m_animator.SetIKRotation(AvatarIKGoal.RightHand, m_rightHandTarget.GetIKRotation());
}
}
#endregion MonoBehaviour Functions
#region Class Functionality
#endregion Class Functionality
#region Editor Functions
/// <summary>
/// Called when the Component is created or Reset from the Inspector
/// </summary>
private void Reset()
{
//useful for finding components on creation
}
#endregion Editor Functions
}

+ 11
- 0
Assets/Scripts/Player/IkController.cs.meta View File

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

Assets/Scenes/Utility.meta → Assets/Scripts/Utility.meta View File


Assets/Scenes/Utility/CopyTransform.cs → Assets/Scripts/Utility/CopyTransform.cs View File


Assets/Scenes/Utility/CopyTransform.cs.meta → Assets/Scripts/Utility/CopyTransform.cs.meta View File


BIN
ProjectSettings/ShaderGraphSettings.asset (Stored with Git LFS) View File

size 885

Loading…
Cancel
Save