在根运动打开时,施加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. readonly 和 disable的区别

    Readonly和Disabled它们都能够做到使用户不能够更改表单域中的内容.但是它们之间有着微小的差别,总结如下: Readonly只针对input(text / password)和textar ...

  2. Vector 多字段排序的Java实现

    要求实现: Vector 多字段排序,其中首元素不参与排序,第一二三字段升序,空排到前面. //这里是Vector的元素定义 public class AVectorElement { private ...

  3. STL - 容器 - List

    List内部结构完全不同于array, vector, deque. 它提供了两个pointer,指向第一个和最后一个元素. 不支持随机访问元素,因此要访问第n个元素必须爬过n - 1个元素. 在任何 ...

  4. 微信小程序 - switchTab传值

    “众所周知,switchTab是不能携带参数的” 我们有几种方式解决呢?(最好的解决方法是利用全局变量,这样可以避免因缓存造成的数据错误) 1. 通过全局变量(需要用到的页面都要引用它) 点击下载示例 ...

  5. PHP表单- PHP $_GET 变量

    PHP $_GET 变量 在 PHP 中,预定义的 $_GET 变量用于收集来自 method="get" 的表单中的值. $_GET 变量 预定义的 $_GET 变量用于收集来自 ...

  6. 亲自己主动手从源代码 构建 Groovy 2.3.8 公布包

    今天为了学习 怎样使用 Groovy 写 Groovy 的測试代码, 所以到 http://groovy.codehaus.org/Download 下载了 Groovy 2.3.8 的源码包. Gr ...

  7. TopCoder SRM624 BuildingHeightEasy 题解

    本题题意就是求有一组建筑物,问把这些建筑物的M个都统一到同一高度.须要的最小改动高度是多少? 题意隐含的意思就是由于是建筑物,所以不能降低,仅仅能添加了. 本题能够使用暴力搜索,由于数据量少. 可是事 ...

  8. highstock使用案例(异步请求,懒加载)

    jsp中导入:<script src="<c:url value="/resources/js/highstock.js"></c:url> ...

  9. 如何高效的阅读hadoop源代码?

    个人谈谈阅读hadoop源代码的经验. 首先,不得不说,hadoop发展到现在这个阶段,代码已经变得非常庞大臃肿,如果你直接阅读最新版本的源代码,难度比较大,需要足够的耐心和时间,所以,如果你觉得认真 ...

  10. JS正则判断输入框是否仅仅含有汉字、字母和数字

    代码如下: if($.trim($("#user_api_register_form").find("input[name='user_name']").val ...