initial upload
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4b02f60233a6cf4eb1c424f90323213
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Unity-Master/Assets/Plugins/RootMotion/Baker/_DEMOS/Baked Clips/Clip 1_Baked.anim
(Stored with Git LFS)
Normal file
BIN
Unity-Master/Assets/Plugins/RootMotion/Baker/_DEMOS/Baked Clips/Clip 1_Baked.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3451f091c656bfc429396cc701ac5b8d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Unity-Master/Assets/Plugins/RootMotion/Baker/_DEMOS/Humanoid Baker Clip Sampler.controller
(Stored with Git LFS)
Normal file
BIN
Unity-Master/Assets/Plugins/RootMotion/Baker/_DEMOS/Humanoid Baker Clip Sampler.controller
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24d41cb619dc9dc42bf10705eb128c97
|
||||
timeCreated: 1516284817
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Unity-Master/Assets/Plugins/RootMotion/Baker/_DEMOS/Humanoid Baker.unity
(Stored with Git LFS)
Normal file
BIN
Unity-Master/Assets/Plugins/RootMotion/Baker/_DEMOS/Humanoid Baker.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0bd8d9a8cbacde343967c95c4458318e
|
||||
timeCreated: 1517387718
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3349a7526568cf042bf8609694db3327
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,53 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RootMotion.Demos
|
||||
{
|
||||
// Adds simple FK rotation offset to bones.
|
||||
public class FKOffset : MonoBehaviour
|
||||
{
|
||||
[System.Serializable]
|
||||
public class Offset
|
||||
{
|
||||
[HideInInspector] public string name;
|
||||
public HumanBodyBones bone;
|
||||
public Vector3 rotationOffset;
|
||||
|
||||
private Transform t;
|
||||
|
||||
public void Apply(Animator animator)
|
||||
{
|
||||
if (t == null) t = animator.GetBoneTransform(bone);
|
||||
if (t == null) return;
|
||||
|
||||
t.localRotation *= Quaternion.Euler(rotationOffset);
|
||||
}
|
||||
}
|
||||
|
||||
public Offset[] offsets;
|
||||
|
||||
private Animator animator;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
animator = GetComponent<Animator>();
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
foreach (Offset offset in offsets)
|
||||
{
|
||||
offset.Apply(animator);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
foreach (Offset offset in offsets)
|
||||
{
|
||||
offset.name = offset.bone.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea198996b9a58624b82f921e56faf4ba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user