在根运动打开时,施加AddForce,速率在后面几帧被清0了:

没有打开根运动AddForce的情况:

unity论坛看了下,似乎有人遇到这个问题,而且无解。只能受力状态下关闭根运动

Q:Im working on a new title right now and I wanted to try out mecanim. I've watched its tutorial and it is indeed impressive to see how easily such motion is achieved using the system.

However, I ran into my first problem using it not long before I started. My game involves a lot of physics, projectiles that hit the target need to push it back, knock enemies out of the arenas, etc, which I was doing without much problem before. I just add force to rigidbodies on collision and they fly away.

However, once I put my mecanim animated character, just standing there on idle, it doesnt move when hit, as if it was a kinematic rigidbody (which it isnt).

How can I have my character move using mecanim for fluid motion, but still be affected by world physics?

PS: The push back mechanics are working on legacy animated/moved characters

Thx for the attention

A:Click on your character. In the inspector you'll see in the Animator a check box: "Apply Root Motion." Disable this and you will be able to knock your guy about using addForce or whatever physics you like all at the same time playing its animation. Obviously you'll want to use root motion most of the time or your guy will just run in place when you use the controls, so you'll need to disable "Apply Root Motion" in script during events such as getting hit.

http://answers.unity3d.com/questions/407103/mecanim-and-physics.html

后来想想也奇怪,打开根运动时,AddForce能让角色飞起来,但不能xz轴横移。。

Animator根运动清除刚体速率问题测试的更多相关文章

  1. Unity刚体穿透问题测试以及解决

    测试环境很简单,一面墙,红色方块不停向前 然后,由于刚体是FixedUpdate执行的,把FixedUpdate执行间隔调慢一些方便Debug: OK,下面还原一次经典的穿透问题: 测试脚本: voi ...

  2. 根运动 (Root Motion) – 工作原理

    http://blog.csdn.net/myarrow/article/details/45505085 1. 基本概念 在Unity3D动画中,模型的位置.角度经常会发生变化,我们需要决定是否将模 ...

  3. RootMotionComputer 根运动计算机

    using UnityEngine; using System.Collections; /* * -------------------------------------------------- ...

  4. Animator根骨骼运动原始实现代码

    实测过确实可行,注意如果没有刚体组件,实现方式会不一样 public class TestSMB : StateMachineBehaviour { public override void OnSt ...

  5. Unity3D刚体不同力的测试(ForceMode,AddForce,RelativeAddForce)

    摘自圣典的一段翻译: ForceAdd a continuous force to the rigidbody, using its mass.添加一个可持续力到刚体,使用它的质量.Accelerat ...

  6. 刚体Collider包围测试

    测试结果为会自动排出修正坐标(之前位于中心): 2016/2/29补充: 如果外面大的Cube相对小的Cube质量很高,会弹出且不出现移动(已锁住弹出物旋转,如果不锁会飞出去): 如果没有足够的空间排 ...

  7. 【多视图几何】TUM 课程 第2章 刚体运动

    课程的 YouTube 地址为:https://www.youtube.com/playlist?list=PLTBdjV_4f-EJn6udZ34tht9EVIW7lbeo4 .视频评论区可以找到课 ...

  8. "Unity测试系列"文章索引

    对Unity各种API的细节进行测试 Common 一些Unity基础操作的性能测试 Animation/Animator Animation Play/Stop测试 关于Animation动画事件的 ...

  9. unity 对Animator动画系统的研究

    unity的新动画系统叫Mecanim,使用Animator来取代旧系统Animation,按Unity文档的惯例:知识点主要分2部分:unity manual和unity script,读者可以边看 ...

随机推荐

  1. centos+apache+mod_ssl

    参考网站:配置Apache建立openssl证书实现SSL访问:http://blog.51yip.com/apachenginx/958.html用ca工具生成证书的方法:http://hi.bai ...

  2. webstorm激活+汉化教程

    1.安装教程+激活 输入的激活网址: http://idea.imsxm.com/ 2.汉化教程 软件适用于:webstorm2017.2以及以上,如有需要可直接加本人QQ 1940694428.

  3. Java Web开发基础(3)-JSTL

    在DRP项目中接触到了JSTL标签库,对我这样的比較懒的人来说,第一感觉就是"惊艳". JSTL标签库的使用.能够消除大量复杂.繁复的工作.工作量降低的不是一点半点.是降低了一大半 ...

  4. Spring Web MVC 原理学习(下)

             接着上一篇博客,这一篇.我们依据一个简单的demo,来对SpringMVC的原理再次学习:   一.配置web.xml                   我们新建一个web项目.在 ...

  5. java格式化百分比

    NumberFormat nf = NumberFormat.getPercentInstance(); System.out.println(nf.format(0.47)); 显示:47% Dec ...

  6. H5中JavaScript常用代码片段

    /** * 批量替换方法,批量过滤特殊字符,通常用在通过后的各种编辑器添加的内容在App上编辑上使用 * james.wang 2016-11-11 * 使用方法:ReCont(Content,[&q ...

  7. Theano Logistic Regression

    原理 逻辑回归的推理过程能够參考这篇文章:http://blog.csdn.net/zouxy09/article/details/20319673,当中包括了关于逻辑回归的推理,梯度下降以及pyth ...

  8. 关于html中的doctype的重要性的认知以及IE的浏览器模式与文档模式

    浏览器模式”用于切换IE针对该网页的默认文档模式.对不同版本浏览器的条件备注解析.发送给网站服务器的用户代理(User-Agent)字符串的值.网站可以根据浏览器返回的不同用户代理字符串判断浏览器的版 ...

  9. Tomcat訪问日志浅析

    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" ...

  10. 使用DotNetBarcode制作基本常用条码

    核心代码: /// <summary> /// 打印一维码 /// </summary> /// <param name="codeText"> ...