unity2d关闭网格线 unity怎么关网格_java

蒙皮骨骼动画 unity

This post is a guide to importing a skinned mesh with a looping animation and then animating it’s position in Unity.

这篇文章是有关导入带有循环动画的蒙皮网格物体,然后对其在Unity中的位置进行动画处理的指南。

At the end of the guide you should been able to import a skinned mesh, parent it to a position node, animate positions & rotations along waypoints and then edit the animations, duplicate and move your mesh & animation path.

在本指南的最后,您应该能够导入蒙皮的网格,将其作为父节点放置在位置节点上,对沿航路点的位置和旋转进行动画处理,然后编辑动画,复制并移动网格和动画路径。

(Export)

FBX export guide for more details. If it is the only object and animation in the file you could save a Native 3D file – e.g. MB or.max, but to keep things simple I like to export just what I need. Make sure you: FBX导出指南以了解更多详细信息。 如果它是文件中唯一的对象和动画,则可以保存一个本机3D文件-例如MB或.max,但是为了使事情变得简单,我希望仅导出需要的内容。 确保你:

  • Set the keyframe range for one animation or export all animations and remember to set up splits in Unity or use @ name formating (see documentation on animation). 设置一个动画的关键帧范围或导出所有动画,并记住要在Unity中设置分割或使用@名称格式(请参阅动画文档 )。
  • Choose whether to bake your keyframes or not; 选择是否烘烤关键帧;

unity2d关闭网格线 unity怎么关网格_python_02

(Setup)

  • Open or create a scene – Drag your animated model, lets call it Shark into the scene. 打开或创建场景–拖动动画模型,将其命名为Shark进入场景。
  • Create an empty object in the scene: from the Menu choose > Game Object > Create Empty – name it to SharkPos, where Shark is the name of your animated object and Position. 在场景中创建一个空对象:从菜单中选择>游戏对象>创建空对象-将其命名为Shark Pos ,其中Shark是动画对象和位置的名称。
  • Move the empty SharkPos to the location of Shark, so you can use the gizmo from the same position. To position accurately you could copy and past the translation values. 将空的Shark Pos移动到Shark的位置,以便可以从相同位置使用Gizmo。 为了准确定位,您可以复制并粘贴转换值。
  • Parent your Shark to the SharkPos object (this allows you to keep separate the animation of the position from the animated object’s idle/other animations). 将“ Shark” ( 鲨鱼)与“ Shark Pos” ( 鲨鱼 Pos)对象作为父对象(这使您可以将位置的动画与动画对象的“空闲” /其他动画分开)。

unity2d关闭网格线 unity怎么关网格_python_03

(Animate)

  • Animate position/rotation of xPos: xPos的动画位置/旋转:
  1. Open animation panel 打开动画面板
  2. Create new clip > name and place somewhere sensible like assets\animation 创建新的片段 >名称并放置在明智的位置,例如资产\动画
  3. Move SharkPos to start position – Use gizmo to move object to desired position for start of your animation (this updates the translate value, so move a bit even if close to desired position) 将 Shark Pos 移动到起始位置 –使用Gizmo将对象移动到所需位置以开始动画(这将更新转换值,因此即使靠近所需位置也要移动一点)
  4. Set a keyframe on frame 0 with the  <>+ button 使用<> +按钮在第0 帧上设置关键帧
  5. Move to next  keyframe – Drag forward  in the time line, marked by seconds – you may need to zoom in and out with  scroll wheel 移至下一个关键帧 –在时间线中向前拖动,以秒为标记–您可能需要使用滚轮进行放大和缩小
  6. Move and/or rotate SharkPos (keyframe will be set for you) 移动和/或旋转 Shark Pos (将为您设置关键帧)

unity2d关闭网格线 unity怎么关网格_unity2d关闭网格线_04

Check the animation panel intro video for a more detailed look at the interface:   http://video.unity3d.com/video/3005614/animation-view-intro 查看动画面板介绍视频,以更详细地了解该界面: http : //video.unity3d.com/video/3005614/animation-view-intro

编辑 (Edit)

  • To ensure a looping path, copy values from the first to the last keyframe – e.g click in the value of translation x, copy the number, go to the last keyframe click in the value and paste, and so on. 为了确保循环路径,请将值从第一个关键帧复制到最后一个关键帧–例如,单击转换x的值,复制数字,转到最后一个关键帧,单击该值并粘贴,依此类推。
  • For Rotation values, to ensure consistent rotation direction, make sure the first and last are not the same value but 360 degrees apart e.g. first frame is y=-30 the last frame is y= 330. 对于“旋转”值,要确保旋转方向一致,请确保第一个和最后一个不是相同的值,而是相隔360度,例如,第一帧为y = -30,最后一帧为y = 330。
  • To change the way your animation eases in and out of each keyframe right click the keyframe and choose the Tangents to edit and manipulate the handles – see editing curves for more info. 要更改动画在每个关键帧中进出的方式,请右键单击关键帧,然后选择“切线”以编辑和操纵控柄–有关更多信息,请参见编辑曲线 。

(Finalise)

  • Parent to a new empty object – e.g.Shark01 this node can be used to move the whole animated object and path together. 新建一个空对象的父对象-例如Shark 01,此节点可用于将整个动画对象和路径一起移动。

Two Hammerheads in your pool :-)

您池中的两个锤头鱼:-)

翻译自: https://blogs.unity3d.com/2011/09/20/animating-skinned-mesh-along-waypoints-in-unity/

蒙皮骨骼动画 unity