messing with animations
This commit is contained in:
@@ -86,6 +86,14 @@ namespace RebootReality.jelycho.Player {
|
|||||||
Pitch = Mathf.Clamp(Pitch, m_PitchMin, m_PitchMax);
|
Pitch = Mathf.Clamp(Pitch, m_PitchMin, m_PitchMax);
|
||||||
|
|
||||||
Yaw += x * sens;
|
Yaw += x * sens;
|
||||||
|
|
||||||
|
while (Yaw < 0.0f) {
|
||||||
|
Yaw += 360.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (Yaw > 360.0f) {
|
||||||
|
Yaw -= 360.0f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLookDirection(Vector3 forward) {
|
public void SetLookDirection(Vector3 forward) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
using Oddworm.Framework;
|
using System.Collections.Generic;
|
||||||
using R3;
|
using R3;
|
||||||
|
using RebootKit.Engine.Extensions;
|
||||||
using RebootKit.Engine.Main;
|
using RebootKit.Engine.Main;
|
||||||
using RebootKit.Engine.Network;
|
using RebootKit.Engine.Network;
|
||||||
using RebootKit.Engine.Simulation;
|
using RebootKit.Engine.Simulation;
|
||||||
@@ -115,7 +116,7 @@ namespace RebootReality.jelycho.Player {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Actor> m_AdditionalMountedActor = new List<Actor>();
|
readonly List<Actor> m_AdditionalMountedActor = new List<Actor>();
|
||||||
|
|
||||||
protected override IActorData CreateActorData() {
|
protected override IActorData CreateActorData() {
|
||||||
return new PlayerActorData { };
|
return new PlayerActorData { };
|
||||||
@@ -640,7 +641,7 @@ namespace RebootReality.jelycho.Player {
|
|||||||
m_CameraBobbingTransitionSpeed * deltaTime);
|
m_CameraBobbingTransitionSpeed * deltaTime);
|
||||||
// m_Camera.SetBobbing(m_CurrentCameraBobbing);
|
// m_Camera.SetBobbing(m_CurrentCameraBobbing);
|
||||||
m_Camera.SetBobbing(0.0f);
|
m_Camera.SetBobbing(0.0f);
|
||||||
|
|
||||||
// m_CameraSpring.UpdateSpring(deltaTime,
|
// m_CameraSpring.UpdateSpring(deltaTime,
|
||||||
// m_CharacterForwardTransform.up,
|
// m_CharacterForwardTransform.up,
|
||||||
// m_CharacterForwardTransform.right,
|
// m_CharacterForwardTransform.right,
|
||||||
@@ -825,6 +826,9 @@ namespace RebootReality.jelycho.Player {
|
|||||||
// @MARK: Common
|
// @MARK: Common
|
||||||
//
|
//
|
||||||
void TickCharacterRotation(float dt) {
|
void TickCharacterRotation(float dt) {
|
||||||
|
float3 targetCharacterForward = math.normalize(LookDirection.With(y: 0.0f));
|
||||||
|
float3 currentCharacterForward = math.normalize(m_CharacterForwardTransform.forward.With(y: 0.0f));
|
||||||
|
|
||||||
float angleDeg = Mathf.DeltaAngle(m_Camera.Yaw, m_Locomotion.YawRotation);
|
float angleDeg = Mathf.DeltaAngle(m_Camera.Yaw, m_Locomotion.YawRotation);
|
||||||
|
|
||||||
bool rotateCharacter = false;
|
bool rotateCharacter = false;
|
||||||
@@ -845,14 +849,21 @@ namespace RebootReality.jelycho.Player {
|
|||||||
if (!rotateCharacter && math.abs(velocityForward) > 0.01f) {
|
if (!rotateCharacter && math.abs(velocityForward) > 0.01f) {
|
||||||
rotateCharacter = true;
|
rotateCharacter = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rotateCharacter) {
|
if (rotateCharacter) {
|
||||||
m_CharacterTurnVelocity = rotateCharacterSpeed * dt;
|
m_CharacterTurnVelocity = rotateCharacterSpeed * dt;
|
||||||
m_CharacterTurnVelocitySmooth = m_CharacterTurnVelocity;
|
m_CharacterTurnVelocitySmooth = m_CharacterTurnVelocity;
|
||||||
|
|
||||||
|
// var newForward = Vector3.RotateTowards(currentCharacterForward,
|
||||||
|
// targetCharacterForward,
|
||||||
|
// math.radians(m_CharacterTurnVelocity),
|
||||||
|
// 0.0f);
|
||||||
|
// m_CharacterForwardTransform.forward = newForward;
|
||||||
|
|
||||||
float newYaw = Mathf.MoveTowardsAngle(m_Locomotion.YawRotation,
|
float newYaw = Mathf.MoveTowardsAngle(m_Locomotion.YawRotation,
|
||||||
m_Camera.Yaw,
|
m_Camera.Yaw,
|
||||||
m_CharacterTurnVelocity);
|
m_CharacterTurnVelocity);
|
||||||
|
newYaw = m_Camera.Yaw;
|
||||||
// s_Logger.Info($"YAW: {newYaw}");
|
// s_Logger.Info($"YAW: {newYaw}");
|
||||||
m_Locomotion.YawRotation = newYaw;
|
m_Locomotion.YawRotation = newYaw;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ namespace RebootReality.jelycho.Player {
|
|||||||
var strafeLeftPlayable = AnimationClipPlayable.Create(graph, m_StrafeLeftClip);
|
var strafeLeftPlayable = AnimationClipPlayable.Create(graph, m_StrafeLeftClip);
|
||||||
var turnRightPlayable = AnimationClipPlayable.Create(graph, m_TurnRightClip);
|
var turnRightPlayable = AnimationClipPlayable.Create(graph, m_TurnRightClip);
|
||||||
var turnLeftPlayable = AnimationClipPlayable.Create(graph, m_TurnLeftClip);
|
var turnLeftPlayable = AnimationClipPlayable.Create(graph, m_TurnLeftClip);
|
||||||
|
|
||||||
m_Mixer.ConnectInput(0, idlePlayable, 0, 1.0f);
|
m_Mixer.ConnectInput(0, idlePlayable, 0, 1.0f);
|
||||||
m_Mixer.ConnectInput(1, runForwardPlayable, 0, 0.0f);
|
m_Mixer.ConnectInput(1, runForwardPlayable, 0, 0.0f);
|
||||||
m_Mixer.ConnectInput(2, runBackwardsPlayable, 0, 0.0f);
|
m_Mixer.ConnectInput(2, runBackwardsPlayable, 0, 0.0f);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -111,13 +111,13 @@ ModelImporter:
|
|||||||
loop: 0
|
loop: 0
|
||||||
hasAdditiveReferencePose: 0
|
hasAdditiveReferencePose: 0
|
||||||
loopTime: 1
|
loopTime: 1
|
||||||
loopBlend: 1
|
loopBlend: 0
|
||||||
loopBlendOrientation: 0
|
loopBlendOrientation: 0
|
||||||
loopBlendPositionY: 0
|
loopBlendPositionY: 0
|
||||||
loopBlendPositionXZ: 0
|
loopBlendPositionXZ: 0
|
||||||
keepOriginalOrientation: 1
|
keepOriginalOrientation: 0
|
||||||
keepOriginalPositionY: 1
|
keepOriginalPositionY: 1
|
||||||
keepOriginalPositionXZ: 1
|
keepOriginalPositionXZ: 0
|
||||||
heightFromFeet: 0
|
heightFromFeet: 0
|
||||||
mirror: 0
|
mirror: 0
|
||||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||||
|
|||||||
@@ -772,7 +772,6 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 00a9f9c2ce4a41fdaadcfb24c4233127, type: 3}
|
m_Script: {fileID: 11500000, guid: 00a9f9c2ce4a41fdaadcfb24c4233127, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_RigBuilder: {fileID: 5341614616933970905}
|
|
||||||
m_ReAnimator: {fileID: 3871962590503854066}
|
m_ReAnimator: {fileID: 3871962590503854066}
|
||||||
m_HandsLayerIndex: 2
|
m_HandsLayerIndex: 2
|
||||||
onQuickAttackFinished:
|
onQuickAttackFinished:
|
||||||
@@ -818,7 +817,6 @@ MonoBehaviour:
|
|||||||
mask: {fileID: 0}
|
mask: {fileID: 0}
|
||||||
isAdditive: 0
|
isAdditive: 0
|
||||||
targetWeight: 0
|
targetWeight: 0
|
||||||
tickMode: 0
|
|
||||||
references:
|
references:
|
||||||
version: 2
|
version: 2
|
||||||
RefIds:
|
RefIds:
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask",
|
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask",
|
||||||
"com.cysharp.zlinq": "https://github.com/Cysharp/ZLinq.git?path=src/ZLinq.Unity/Assets/ZLinq.Unity",
|
"com.cysharp.zlinq": "https://github.com/Cysharp/ZLinq.git?path=src/ZLinq.Unity/Assets/ZLinq.Unity",
|
||||||
"com.github-glitchenzo.nugetforunity": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity",
|
"com.github-glitchenzo.nugetforunity": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity",
|
||||||
|
"com.greenbamboogames.playablegraphmonitor": "https://github.com/SolarianZ/UnityPlayableGraphMonitorTool.git",
|
||||||
"com.oddworm.dbgdraw": "https://github.com/pschraut/UnityDbgDraw.git#1.2.0",
|
"com.oddworm.dbgdraw": "https://github.com/pschraut/UnityDbgDraw.git#1.2.0",
|
||||||
"com.unity.2d.sprite": "1.0.0",
|
"com.unity.2d.sprite": "1.0.0",
|
||||||
"com.unity.addressables": "2.2.2",
|
"com.unity.addressables": "2.2.2",
|
||||||
|
|||||||
@@ -39,6 +39,13 @@
|
|||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"hash": "fe31ad0904abee296b5ea72c6073157accba59e8"
|
"hash": "fe31ad0904abee296b5ea72c6073157accba59e8"
|
||||||
},
|
},
|
||||||
|
"com.greenbamboogames.playablegraphmonitor": {
|
||||||
|
"version": "https://github.com/SolarianZ/UnityPlayableGraphMonitorTool.git",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "git",
|
||||||
|
"dependencies": {},
|
||||||
|
"hash": "79a77b0c18ac605ad3dbf9b7b72e27696beafb75"
|
||||||
|
},
|
||||||
"com.oddworm.dbgdraw": {
|
"com.oddworm.dbgdraw": {
|
||||||
"version": "https://github.com/pschraut/UnityDbgDraw.git#1.2.0",
|
"version": "https://github.com/pschraut/UnityDbgDraw.git#1.2.0",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user