zoukankan      html  css  js  c++  java
  • Mecanim 动画系统 一

      首先,在5.0 中,对于每个State 、Bleed Tree 可以给他们添加脚本,就像控制角色模型一样

    using UnityEngine;
    using System.Collections;
    
    public class State : StateMachineBehaviour {
    
      
         // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
          
        }
    
        // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
        override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
    
        }
    
        // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
        override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
    
        }
    
        // OnStateMove is called right after Animator.OnAnimatorMove(). Code that processes and affects root motion should be implemented here
        override public void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
    
        }
    
        // OnStateIK is called right after Animator.OnAnimatorIK(). Code that sets up animation IK (inverse kinematics) should be implemented here.
        // 反向动力学 , 有反向动力学时调用.  //
        override public void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
    
        }
    }
    OnStateIK() 是用来写反向动力学的 . 学习下关于什么是方向动力学 http://blog.csdn.net/huang9012/article/details/18183437


  • 相关阅读:
    备战-Java 并发
    备战-Java 容器
    备战-Java 基础
    算法-链表
    2021-常见问题收集整理-1
    算法-双指针
    HTTP 下载文件的一些记录
    语义化版本 2.0.0
    勒索病毒典型传播途径与预防建议
    看杨院士如何解读——北斗与综合PNT体系
  • 原文地址:https://www.cnblogs.com/bambomtan/p/4650968.html
Copyright © 2011-2022 走看看