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 { };
|
||||
@@ -640,7 +641,7 @@ namespace RebootReality.jelycho.Player {
|
||||
m_CameraBobbingTransitionSpeed * deltaTime);
|
||||
// m_Camera.SetBobbing(m_CurrentCameraBobbing);
|
||||
m_Camera.SetBobbing(0.0f);
|
||||
|
||||
|
||||
// m_CameraSpring.UpdateSpring(deltaTime,
|
||||
// m_CharacterForwardTransform.up,
|
||||
// m_CharacterForwardTransform.right,
|
||||
@@ -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;
|
||||
@@ -845,14 +849,21 @@ namespace RebootReality.jelycho.Player {
|
||||
if (!rotateCharacter && math.abs(velocityForward) > 0.01f) {
|
||||
rotateCharacter = true;
|
||||
}
|
||||
|
||||
|
||||
if (rotateCharacter) {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace RebootReality.jelycho.Player {
|
||||
var strafeLeftPlayable = AnimationClipPlayable.Create(graph, m_StrafeLeftClip);
|
||||
var turnRightPlayable = AnimationClipPlayable.Create(graph, m_TurnRightClip);
|
||||
var turnLeftPlayable = AnimationClipPlayable.Create(graph, m_TurnLeftClip);
|
||||
|
||||
|
||||
m_Mixer.ConnectInput(0, idlePlayable, 0, 1.0f);
|
||||
m_Mixer.ConnectInput(1, runForwardPlayable, 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
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user