在根运动打开时,施加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. PS常用技能综合

    1.ps中怎么吧选中的一块区域覆盖到另一个区域中? 1.用PS中选取工具或套索工具--选好后用移动工具把你选取的区域移动到你要覆盖的地方2.或用图章工具中的仿制图章 2.如何将选中的区域新建为一个新图 ...

  2. Android网络:开发浏览器(二)——功能完善之书签功能

    经过上述的编写,基本的功能已经完成了,不过工具栏里面基本还是一片空白,只有一个刷新的功能,现在咱们就先完善这些功能(之前有朋友说来点图,那么这次我会截些图更好的来描述). 既然是浏览器,怎么能没有书签 ...

  3. Java从零开始学十三(封装)

    一.什么是封装,为什么要封装 对面向对象而言:封装就是将方法和属性包装到一个程序单元中,并且这个单元以类的形式实现. 简单讲:封闭就是将属性私有化,提供公有方法来访问私有属性 封装的作用: 封装反映和 ...

  4. 设置python 命令行交互程序自己主动补齐

    1. 新建Python环境变量配置文件: vim ~/.pystartup # Add auto-completion and a stored history file of commands to ...

  5. 解决运行Maven是报错:No goals have been specified for this build

    pom.xml文件<build>标签后面加上<defaultGoal>compile</defaultGoal>即可

  6. 《微赢微信公众平台系统5月14最新破解高级运营版+水果机+邀请函+微汽车+微食品+用户CRM》

    <微赢微信公众平台系统5月14最新破解高级运营版+水果机+邀请函+微汽车+微食品+用户CRM> 此版本号眼下是淘宝卖600RMB的,其他VIP源代码论坛也都还没有公布.咱们这里全然免费分享 ...

  7. 12、static final

    Java中修饰常量用static final 用static final同时修饰的变量只能是成员变量而不能是局部变量 初始化: ①:定义时赋值 ②:静态代码块static{}中赋值 static 和 ...

  8. servlet ServletConfig ServletContext

    ServletConfig对象 在Servlet的配置文件中,可以使用一个或者多个<init-param>标签为servlet配置一些初始化参数. 当servlet配置了初始化参数后,we ...

  9. Redis批量查询删除KEYS

    对腾讯云的Redis集群不支持很多指令(config get * .flushdb.flushall.等相关指令) redis指令限制:https://www.qcloud.com/document/ ...

  10. C-I/O操作函数详解

    EOF: End Of File, 文字流结尾, 这里的文字流可以是文件(file), 也可以是标准输入(stdin), 它的值在任何可能出现的字符之外(-1) 先列出三种基本类型操作函数 这里面返回 ...