Skip to content

Commit f520eb2

Browse files
committed
Fixes to IK
1 parent 42caa2a commit f520eb2

29 files changed

+1157
-260
lines changed

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/AvatarBase.prefab renamed to unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/AvatarBaseWithIK.prefab

Lines changed: 433 additions & 156 deletions
Large diffs are not rendered by default.

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/AvatarBase.prefab.meta renamed to unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/AvatarBaseWithIK.prefab.meta

File renamed without changes.

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/New Avatar Mask.mask renamed to unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/AvatarMask.mask

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AvatarMask:
66
m_CorrespondingSourceObject: {fileID: 0}
77
m_PrefabInstance: {fileID: 0}
88
m_PrefabAsset: {fileID: 0}
9-
m_Name: New Avatar Mask
9+
m_Name: AvatarMask
1010
m_Mask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
1111
m_Elements:
1212
- m_Path:

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/New Avatar Mask.mask.meta renamed to unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/AvatarMask.mask.meta

File renamed without changes.

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/Avatar_FBX_Anim1.fbx.meta

Lines changed: 365 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/CharacterAnimator.controller

Lines changed: 98 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
%YAML 1.1
22
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!1101 &-7988993525725839332
4+
AnimatorStateTransition:
5+
m_ObjectHideFlags: 1
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_Name:
10+
m_Conditions: []
11+
m_DstStateMachine: {fileID: 0}
12+
m_DstState: {fileID: -4050450968213979288}
13+
m_Solo: 0
14+
m_Mute: 0
15+
m_IsExit: 0
16+
serializedVersion: 3
17+
m_TransitionDuration: 0.09402645
18+
m_TransitionOffset: 0
19+
m_ExitTime: 0.9
20+
m_HasExitTime: 1
21+
m_HasFixedDuration: 0
22+
m_InterruptionSource: 0
23+
m_OrderedInterruption: 1
24+
m_CanTransitionToSelf: 1
325
--- !u!1102 &-7971650593490172519
426
AnimatorState:
527
serializedVersion: 6
@@ -211,7 +233,10 @@ AnimatorStateMachine:
211233
m_Position: {x: 320, y: 200, z: 0}
212234
- serializedVersion: 1
213235
m_State: {fileID: 6626008193833255465}
214-
m_Position: {x: 70, y: 200, z: 0}
236+
m_Position: {x: 30, y: 200, z: 0}
237+
- serializedVersion: 1
238+
m_State: {fileID: 7720407666756339275}
239+
m_Position: {x: 120, y: 320, z: 0}
215240
m_ChildStateMachines:
216241
- serializedVersion: 1
217242
m_StateMachine: {fileID: -2772301717899763986}
@@ -571,6 +596,7 @@ AnimatorState:
571596
- {fileID: 4615173915622944316}
572597
- {fileID: 4302603106001568696}
573598
- {fileID: -2920629328503316622}
599+
- {fileID: 1204688441645205064}
574600
m_StateMachineBehaviours: []
575601
m_Position: {x: 50, y: 50, z: 0}
576602
m_IKOnFeet: 0
@@ -992,91 +1018,97 @@ AnimatorController:
9921018
m_DefaultFloat: 3
9931019
m_DefaultInt: 0
9941020
m_DefaultBool: 0
995-
m_Controller: {fileID: 9100000}
1021+
m_Controller: {fileID: 0}
9961022
- m_Name: Jump
9971023
m_Type: 9
9981024
m_DefaultFloat: 0
9991025
m_DefaultInt: 0
10001026
m_DefaultBool: 0
1001-
m_Controller: {fileID: 9100000}
1027+
m_Controller: {fileID: 0}
10021028
- m_Name: IsGrounded
10031029
m_Type: 4
10041030
m_DefaultFloat: 0
10051031
m_DefaultInt: 0
10061032
m_DefaultBool: 0
1007-
m_Controller: {fileID: 9100000}
1033+
m_Controller: {fileID: 0}
10081034
- m_Name: EmoteLoop
10091035
m_Type: 4
10101036
m_DefaultFloat: 0
10111037
m_DefaultInt: 0
10121038
m_DefaultBool: 0
1013-
m_Controller: {fileID: 9100000}
1039+
m_Controller: {fileID: 0}
10141040
- m_Name: Emote
10151041
m_Type: 4
10161042
m_DefaultFloat: 0
10171043
m_DefaultInt: 0
10181044
m_DefaultBool: 0
1019-
m_Controller: {fileID: 9100000}
1045+
m_Controller: {fileID: 0}
10201046
- m_Name: EmoteRefresh
10211047
m_Type: 9
10221048
m_DefaultFloat: 0
10231049
m_DefaultInt: 0
10241050
m_DefaultBool: 0
1025-
m_Controller: {fileID: 9100000}
1051+
m_Controller: {fileID: 0}
10261052
- m_Name: IsJumping
10271053
m_Type: 4
10281054
m_DefaultFloat: 0
10291055
m_DefaultInt: 0
10301056
m_DefaultBool: 0
1031-
m_Controller: {fileID: 9100000}
1057+
m_Controller: {fileID: 0}
10321058
- m_Name: IsFalling
10331059
m_Type: 4
10341060
m_DefaultFloat: 0
10351061
m_DefaultInt: 0
10361062
m_DefaultBool: 0
1037-
m_Controller: {fileID: 9100000}
1063+
m_Controller: {fileID: 0}
10381064
- m_Name: IsLongJump
10391065
m_Type: 4
10401066
m_DefaultFloat: 0
10411067
m_DefaultInt: 0
10421068
m_DefaultBool: 0
1043-
m_Controller: {fileID: 9100000}
1069+
m_Controller: {fileID: 0}
10441070
- m_Name: RotateLeft
10451071
m_Type: 4
10461072
m_DefaultFloat: 0
10471073
m_DefaultInt: 0
10481074
m_DefaultBool: 0
1049-
m_Controller: {fileID: 9100000}
1075+
m_Controller: {fileID: 0}
10501076
- m_Name: Angle
10511077
m_Type: 1
10521078
m_DefaultFloat: 0
10531079
m_DefaultInt: 0
10541080
m_DefaultBool: 0
1055-
m_Controller: {fileID: 9100000}
1081+
m_Controller: {fileID: 0}
10561082
- m_Name: AngleDir
10571083
m_Type: 1
10581084
m_DefaultFloat: 0
10591085
m_DefaultInt: 0
10601086
m_DefaultBool: 0
1061-
m_Controller: {fileID: 9100000}
1087+
m_Controller: {fileID: 0}
10621088
- m_Name: IsLongFall
10631089
m_Type: 4
10641090
m_DefaultFloat: 0
10651091
m_DefaultInt: 0
10661092
m_DefaultBool: 0
1067-
m_Controller: {fileID: 9100000}
1093+
m_Controller: {fileID: 0}
10681094
- m_Name: IsStunned
10691095
m_Type: 4
10701096
m_DefaultFloat: 0
10711097
m_DefaultInt: 0
10721098
m_DefaultBool: 0
1073-
m_Controller: {fileID: 9100000}
1099+
m_Controller: {fileID: 0}
10741100
- m_Name: WallHit
10751101
m_Type: 9
10761102
m_DefaultFloat: 0
10771103
m_DefaultInt: 0
10781104
m_DefaultBool: 0
1079-
m_Controller: {fileID: 9100000}
1105+
m_Controller: {fileID: 0}
1106+
- m_Name: AFK
1107+
m_Type: 9
1108+
m_DefaultFloat: 0
1109+
m_DefaultInt: 0
1110+
m_DefaultBool: 0
1111+
m_Controller: {fileID: 0}
10801112
m_AnimatorLayers:
10811113
- serializedVersion: 5
10821114
m_Name: Base Layer
@@ -1198,6 +1230,28 @@ AnimatorStateTransition:
11981230
m_InterruptionSource: 0
11991231
m_OrderedInterruption: 1
12001232
m_CanTransitionToSelf: 0
1233+
--- !u!1101 &1204688441645205064
1234+
AnimatorStateTransition:
1235+
m_ObjectHideFlags: 1
1236+
m_CorrespondingSourceObject: {fileID: 0}
1237+
m_PrefabInstance: {fileID: 0}
1238+
m_PrefabAsset: {fileID: 0}
1239+
m_Name:
1240+
m_Conditions: []
1241+
m_DstStateMachine: {fileID: 0}
1242+
m_DstState: {fileID: 7720407666756339275}
1243+
m_Solo: 0
1244+
m_Mute: 0
1245+
m_IsExit: 0
1246+
serializedVersion: 3
1247+
m_TransitionDuration: 0.05
1248+
m_TransitionOffset: 0
1249+
m_ExitTime: 0.7619048
1250+
m_HasExitTime: 0
1251+
m_HasFixedDuration: 0
1252+
m_InterruptionSource: 0
1253+
m_OrderedInterruption: 1
1254+
m_CanTransitionToSelf: 1
12011255
--- !u!1101 &1208421492764531611
12021256
AnimatorStateTransition:
12031257
m_ObjectHideFlags: 1
@@ -1969,6 +2023,34 @@ AnimatorStateTransition:
19692023
m_InterruptionSource: 0
19702024
m_OrderedInterruption: 1
19712025
m_CanTransitionToSelf: 1
2026+
--- !u!1102 &7720407666756339275
2027+
AnimatorState:
2028+
serializedVersion: 6
2029+
m_ObjectHideFlags: 1
2030+
m_CorrespondingSourceObject: {fileID: 0}
2031+
m_PrefabInstance: {fileID: 0}
2032+
m_PrefabAsset: {fileID: 0}
2033+
m_Name: AFK_Action
2034+
m_Speed: 1
2035+
m_CycleOffset: 0
2036+
m_Transitions:
2037+
- {fileID: -7988993525725839332}
2038+
m_StateMachineBehaviours: []
2039+
m_Position: {x: 50, y: 50, z: 0}
2040+
m_IKOnFeet: 0
2041+
m_WriteDefaultValues: 1
2042+
m_Mirror: 0
2043+
m_SpeedParameterActive: 0
2044+
m_MirrorParameterActive: 0
2045+
m_CycleOffsetParameterActive: 0
2046+
m_TimeParameterActive: 0
2047+
m_Motion: {fileID: 4304682399731470351, guid: 0aa2e273500b984418830b3285b404dd,
2048+
type: 3}
2049+
m_Tag:
2050+
m_SpeedParameter:
2051+
m_MirrorParameter:
2052+
m_CycleOffsetParameter:
2053+
m_TimeParameter:
19722054
--- !u!1101 &7842504053680224278
19732055
AnimatorStateTransition:
19742056
m_ObjectHideFlags: 1

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/FootIKController.cs

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using UnityEngine;
3+
4+
public class IKRuntimeConfiguration : MonoBehaviour
5+
{
6+
[SerializeField] private Transform[] objectsToReparent;
7+
[SerializeField] private Transform parent;
8+
9+
public void Start()
10+
{
11+
foreach (Transform tr in objectsToReparent)
12+
{
13+
//tr.SetParent(parent, true);
14+
}
15+
}
16+
}

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/FootIKController.cs.meta renamed to unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/Animation/IKRuntimeConfiguration.cs.meta

File renamed without changes.

unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/CharacterControllerV2/IK.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)