animation fixes

This commit is contained in:
André Cardoso 2021-02-22 16:03:32 +01:00
parent 852af2e251
commit c34062c024
9 changed files with 80470 additions and 1844 deletions

View File

@ -1802,83 +1802,7 @@ AnimationClip:
m_RotationOrder: 4
path: jammo_mixamo_rig/mixamorig:Hips
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: WalkRig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Aim Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Run Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 30
m_WrapMode: 0
@ -2314,34 +2238,6 @@ AnimationClip:
typeID: 4
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 8577085
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 378343073
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 2853054640
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 4230480715
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
@ -10167,82 +10063,6 @@ AnimationClip:
path: jammo_mixamo_rig/mixamorig:Hips
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: WalkRig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Aim Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Run Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
m_EulerEditorCurves:
- curve:
serializedVersion: 2

View File

@ -3593,83 +3593,7 @@ AnimationClip:
m_RotationOrder: 4
path: jammo_mixamo_rig/mixamorig:Hips
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: WalkRig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Run Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Aim Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 30
m_WrapMode: 0
@ -4105,34 +4029,6 @@ AnimationClip:
typeID: 4
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 2853054640
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 8577085
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 4230480715
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 378343073
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
@ -19041,82 +18937,6 @@ AnimationClip:
path: jammo_mixamo_rig/mixamorig:Hips
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: WalkRig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Run Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Aim Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
m_EulerEditorCurves:
- curve:
serializedVersion: 2

File diff suppressed because it is too large Load Diff

View File

@ -4358,83 +4358,7 @@ AnimationClip:
m_RotationOrder: 4
path: jammo_mixamo_rig/mixamorig:Hips
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Run Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: WalkRig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Aim Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 30
m_WrapMode: 0
@ -4870,34 +4794,6 @@ AnimationClip:
typeID: 4
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 2853054640
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 4230480715
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 8577085
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 378343073
attribute: 1257374345
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
@ -22758,82 +22654,6 @@ AnimationClip:
path: jammo_mixamo_rig/mixamorig:Hips
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Run Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: WalkRig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Weight
path: Idle Aim Rig
classID: 114
script: {fileID: 11500000, guid: 70b342d8ce5c2fd48b8fa3147d48d1d1, type: 3}
m_EulerEditorCurves:
- curve:
serializedVersion: 2

File diff suppressed because it is too large Load Diff

View File

@ -13,14 +13,19 @@ MonoBehaviour:
m_Name: ForwardRenderer
m_EditorClassIdentifier:
m_RendererFeatures: []
m_RendererFeatureMap:
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
shaders:
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd,
type: 3}
screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, type: 3}
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
tileDepthInfoPS: {fileID: 0}
tileDeferredPS: {fileID: 0}
stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
m_OpaqueLayerMask:
serializedVersion: 2
m_Bits: 4294967295
@ -34,3 +39,6 @@ MonoBehaviour:
passOperation: 0
failOperation: 0
zFailOperation: 0
m_ShadowTransparentReceive: 1
m_RenderingMode: 0
m_AccurateGbufferNormals: 0

View File

@ -2,15 +2,16 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using Cinemachine;
public class ShootingSystem : MonoBehaviour
{
[SerializeField] ParticleSystem inkParticle;
[SerializeField] ParticleSystem extraParticle;
[SerializeField] Transform[] ikHandlers;
[SerializeField] Transform splatGun;
[SerializeField] Transform parentController;
[SerializeField] Transform splatGunNozzle;
[SerializeField] CinemachineFreeLook freeLookCamera;
// Start is called before the first frame update
void Start()
@ -21,24 +22,26 @@ public class ShootingSystem : MonoBehaviour
// Update is called once per frame
void Update()
{
GetComponent<MovementInput>().blockRotationPlayer= Input.GetMouseButton(0);
Vector3 angle = parentController.localEulerAngles;
GetComponent<MovementInput>().blockRotationPlayer = Input.GetMouseButton(0);
bool pressing = GetComponent<MovementInput>().blockRotationPlayer;
if (Input.GetMouseButton(0))
{
foreach (Transform handler in ikHandlers)
if (!DOTween.IsTweening(parentController))
{
if (!DOTween.IsTweening(handler))
{
handler.DOComplete();
handler.DOPunchPosition(-transform.forward / 13, .15f, 10, 1);
}
parentController.DOComplete();
Vector3 forward = -parentController.forward;
Vector3 localPos = parentController.localPosition;
parentController.DOLocalMove(localPos - new Vector3(0, 0, .1f), .03f)
.OnComplete(() => parentController.DOLocalMove(localPos,.1f).SetEase(Ease.OutSine));
}
if (!DOTween.IsTweening(splatGunNozzle))
{
splatGunNozzle.DOComplete();
splatGunNozzle.DOPunchScale(new Vector3(0,1,1) / 3, .15f, 10, 1);
splatGunNozzle.DOPunchScale(new Vector3(0,1,1) / 1.5f, .15f, 10, 1);
}
GetComponent<MovementInput>().RotateToCamera(transform);
}
if (Input.GetMouseButtonDown(0))
@ -51,5 +54,14 @@ public class ShootingSystem : MonoBehaviour
inkParticle.Stop();
extraParticle.Stop();
}
parentController.localEulerAngles
= new Vector3(Mathf.LerpAngle(parentController.localEulerAngles.x, pressing ? RemapCamera(freeLookCamera.m_YAxis.Value, 0, 1, -25, 25) : 0,.3f), angle.y, angle.z);
}
float RemapCamera(float value, float from1, float to1, float from2, float to2)
{
return (value - from1) / (to1 - from1) * (to2 - from2) + from2;
}
}