diff options
Diffstat (limited to 'Assets/ActionTool')
-rw-r--r-- | Assets/ActionTool/DarkPlane.mat | 77 | ||||
-rw-r--r-- | Assets/ActionTool/DarkPlane.mat.meta | 8 | ||||
-rw-r--r-- | Assets/ActionTool/Editor/ActionData.cs | 8 |
3 files changed, 93 insertions, 0 deletions
diff --git a/Assets/ActionTool/DarkPlane.mat b/Assets/ActionTool/DarkPlane.mat new file mode 100644 index 00000000..2b2169ee --- /dev/null +++ b/Assets/ActionTool/DarkPlane.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: DarkPlane + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.2830189, g: 0.2830189, b: 0.2830189, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/ActionTool/DarkPlane.mat.meta b/Assets/ActionTool/DarkPlane.mat.meta new file mode 100644 index 00000000..9f220667 --- /dev/null +++ b/Assets/ActionTool/DarkPlane.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7e20731177f283f4c83d0f75131677f5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ActionTool/Editor/ActionData.cs b/Assets/ActionTool/Editor/ActionData.cs index 39888914..799b2244 100644 --- a/Assets/ActionTool/Editor/ActionData.cs +++ b/Assets/ActionTool/Editor/ActionData.cs @@ -47,6 +47,7 @@ namespace ActionTool private int m_PrevFrame;
private float m_CurAnimFrame;
private double m_PrevLocalTime;
+ private float m_PrevNormalTime;
private const string kStateName = "Action";
@@ -143,6 +144,7 @@ namespace ActionTool {
m_Animator.transform.position = ActionManager.s_InitPosition;
m_Animator.transform.rotation = ActionManager.s_InitRotation;
+ m_PrevNormalTime = 0;
}
m_CurAnimFrame %= m_TotalFrame;
}
@@ -171,7 +173,13 @@ namespace ActionTool if(m_RootMotion)
{
+#if true
m_Animator.transform.position = m_RootMotion.GetRootMotion(normalizeTime);
+#else
+ Vector3 dis = m_RootMotion.GetRootMotionDistance(m_PrevNormalTime, normalizeTime);
+ m_Animator.transform.position += dis;
+ m_PrevNormalTime = normalizeTime;
+#endif
}
}
|