This commit is contained in:
CortexCore
2023-10-02 23:24:56 +08:00
parent 8ef5c7ec0a
commit 947e52e748
183 changed files with 107857 additions and 9378 deletions

View File

@@ -36,19 +36,13 @@ namespace BITFALL.Scenes
if(EditorApplication.isPlaying is false)
return;
#endif
rigidbodyComponent.Velocity = animator.velocity;
rigidbodyComponent.AngularVelocity = animator.angularVelocity;
rigidbodyComponent.MoveAndRotate(currentPosition,currentRotation);
}
private void OnAnimatorMove()
{
animator.ApplyBuiltinRootMotion();
#if UNITY_EDITOR
// if (EditorApplication.isPlaying is false)
// {
// transform.position = animator.rootPosition;
// transform.rotation = animator.rootRotation;
// }
#endif
currentPosition = animator.rootPosition;
currentRotation = animator.rootRotation;
}