messing with animations
This commit is contained in:
@@ -86,6 +86,14 @@ namespace RebootReality.jelycho.Player {
|
||||
Pitch = Mathf.Clamp(Pitch, m_PitchMin, m_PitchMax);
|
||||
|
||||
Yaw += x * sens;
|
||||
|
||||
while (Yaw < 0.0f) {
|
||||
Yaw += 360.0f;
|
||||
}
|
||||
|
||||
while (Yaw > 360.0f) {
|
||||
Yaw -= 360.0f;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetLookDirection(Vector3 forward) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Oddworm.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using R3;
|
||||
using RebootKit.Engine.Extensions;
|
||||
using RebootKit.Engine.Main;
|
||||
using RebootKit.Engine.Network;
|
||||
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() {
|
||||
return new PlayerActorData { };
|
||||
@@ -825,6 +826,9 @@ namespace RebootReality.jelycho.Player {
|
||||
// @MARK: Common
|
||||
//
|
||||
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);
|
||||
|
||||
bool rotateCharacter = false;
|
||||
@@ -850,9 +854,16 @@ namespace RebootReality.jelycho.Player {
|
||||
m_CharacterTurnVelocity = rotateCharacterSpeed * dt;
|
||||
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,
|
||||
m_Camera.Yaw,
|
||||
m_CharacterTurnVelocity);
|
||||
newYaw = m_Camera.Yaw;
|
||||
// s_Logger.Info($"YAW: {newYaw}");
|
||||
m_Locomotion.YawRotation = newYaw;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -111,13 +111,13 @@ ModelImporter:
|
||||
loop: 0
|
||||
hasAdditiveReferencePose: 0
|
||||
loopTime: 1
|
||||
loopBlend: 1
|
||||
loopBlend: 0
|
||||
loopBlendOrientation: 0
|
||||
loopBlendPositionY: 0
|
||||
loopBlendPositionXZ: 0
|
||||
keepOriginalOrientation: 1
|
||||
keepOriginalOrientation: 0
|
||||
keepOriginalPositionY: 1
|
||||
keepOriginalPositionXZ: 1
|
||||
keepOriginalPositionXZ: 0
|
||||
heightFromFeet: 0
|
||||
mirror: 0
|
||||
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
|
||||
|
||||
@@ -772,7 +772,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 00a9f9c2ce4a41fdaadcfb24c4233127, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RigBuilder: {fileID: 5341614616933970905}
|
||||
m_ReAnimator: {fileID: 3871962590503854066}
|
||||
m_HandsLayerIndex: 2
|
||||
onQuickAttackFinished:
|
||||
@@ -818,7 +817,6 @@ MonoBehaviour:
|
||||
mask: {fileID: 0}
|
||||
isAdditive: 0
|
||||
targetWeight: 0
|
||||
tickMode: 0
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"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.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.unity.2d.sprite": "1.0.0",
|
||||
"com.unity.addressables": "2.2.2",
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"dependencies": {},
|
||||
"hash": "fe31ad0904abee296b5ea72c6073157accba59e8"
|
||||
},
|
||||
"com.greenbamboogames.playablegraphmonitor": {
|
||||
"version": "https://github.com/SolarianZ/UnityPlayableGraphMonitorTool.git",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "79a77b0c18ac605ad3dbf9b7b72e27696beafb75"
|
||||
},
|
||||
"com.oddworm.dbgdraw": {
|
||||
"version": "https://github.com/pschraut/UnityDbgDraw.git#1.2.0",
|
||||
"depth": 0,
|
||||
|
||||
Reference in New Issue
Block a user