U3D官方手册碰撞中文翻译课件_第1页
U3D官方手册碰撞中文翻译课件_第2页
U3D官方手册碰撞中文翻译课件_第3页
U3D官方手册碰撞中文翻译课件_第4页
U3D官方手册碰撞中文翻译课件_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、U3D官方手册碰撞节中文翻译2010-08-31 02:30:01|分类: Unity |标签: |字号大中小订阅 来源: U3D官方手册碰撞节中文翻译-麻雀2009.5.3Box ColliderBox碰撞The Box Collider is a basic cube-shaped collision primitive.box碰撞是最基础的一种碰撞。A pile of Box Colliders一堆box碰撞Properties属性Material 物理材料Reference to the Physic Material that determines how this Collider

2、 interacts with others.选择物理材质,决定物体对其它物体的碰撞方式(自带的有:弹性的,冰,金属,橡胶,木头)Is Trigger 触发If enabled, this Collider is used for triggering events, and is ignored by the physics engine.触发碰撞事件,如果勾选则取消物理模拟。Size 碰撞范围The size of the Collider in the X, Y, Z directions.更改碰撞的X,Y,Z方向的大小Center 中心位置The position of the Col

3、lider in the objects local space.以碰撞的中心点移动碰撞的位置Details详细资料The Box Collider can be resized into different shapes of rectangular prisms. It works great for doors, walls, platforms, etc. It isalso effective as a human torso in a ragdoll or as a car hull in a vehicle. Of course, it works perfectly for j

4、ust boxes and crates as well!box碰撞可以调整成不同形状的长方体。应用于门,墙壁,平台,等。也可以应用于角色的躯体或汽车船体等交通工具。当然,它只是应用于类似BOX形状的物体。A standard Box Collider标准的Box 碰撞Colliders work with Rigidbodies to bring physics in Unity to life. Whereas Rigidbodies allow objects to be controlled by physics, Colliders allow objects to collide

5、with each other. Colliders must be added to objects independently of Rigidbodies. A Collider does not necessarily need a Rigidbody attached, but a Rigidbody must be attached in order for the object to move as a result of collisions.碰撞附加刚体之后能够产生物理模拟。刚体能够让对象(objects)修改物理模拟属性。碰撞允许对象(objects)之间相互影响。碰撞可以

6、附加在没有应用刚体的对象上(objects)。碰撞体不是必须附加刚体,但是,附加了刚体才能实现物理模拟。When a collision between two Colliders occurs and if at least one of them has a Rigidbody attached, three collision messages are sent out to the objects attached to them. These events can be handled in scripting, and allow you to create unique beha

7、viors with or without making use of the built-in Ageias physX engine.如果2个对象之间产生相撞,那么至少有1个是附加刚体的。他们之间会发出相互影响的事件信号。这些事件可以用脚本来实现,你可以自己写脚本,或者用内置的Ageias physX 引擎来应用脚本。Triggers触发An alternative way of using Colliders is to mark them as a Trigger, just check the IsTrigger property checkbox in the Inspector.

8、 Triggers are effectively ignored by the physics engine, and have a unique set of three trigger messages that are sent out when a collision with a Trigger occurs. Triggers are useful for triggering other events in your game, like cutscenes, automatic door opening, displaying tutorial messages, etc.

9、Use your imagination!触发就是对象加不加碰撞的一个标记。触发属性在检视面板(Inspector)里。触发是控制物理模拟的开关。当碰撞体被触发状态时,就会发送出一组触发信号。触发在游戏的其它事件中,也起着非常重要的作用。例如:场景布局,自动门,通讯,等等,所有你能想象的!Be aware that in order for two Triggers to send out trigger events when they collide, one of them must include a Rigidbody as well. For a Trigger to collid

10、e with a normal Collider, one of them must have a Rigidbody attached. For a detailed chart of different types of collisions, see the collision action matrix in the Advanced section below.注意:要使2个触发器发出碰撞事件,其中一个必须包含刚体。详细内容见页底的碰撞矩阵表。Friction and bouncyness摩擦力和弹力Friction, bouncyness and softness are defi

11、ned in the Physic Material. The Standard Assets contain the most common physics materials. To use one of them click on the Physic Material drop-down and select one, eg. Ice. You can also create your own physics materials and tweak all friction values.摩擦力,弹力和柔和的定义在物理材质(Physic Material)那节。标准资源文件夹中(U3D

12、安装目录下的Standard Assets文件夹)带有很多物理材质。你也可以自己创建物理材质和修改系数。Compound Colliders混合碰撞Compound Colliders are combinations of primitive Colliders, collectively acting as a single Collider. They come in handy when you have a complex mesh to use in collisions but cannot use a Mesh Collider. To create a Compound Co

13、llider, create child objects of your colliding object, then add a primitive Collider to each child object. This allows you to position, rotate, and scale each Collider easily and independently of one another.混合碰撞是结合简单碰撞,组成独特的碰撞。当你遇到复杂的物体不合适用mesh碰撞时,可以用混合碰撞的方法。创建每个子物体的简单碰撞来组成混合碰撞。你可以用移动旋转和缩放来调整每个碰撞。A

14、 real-world Compound Collider setup 混合碰撞设置In the above picture, the environment has a Mesh Collider attached. Mesh Colliders work the best for terrain or environments made from irregular shapes. The gun_model GameObject has a Rigidbody attached, and multiple primitive Colliders as child GameObjects.

15、 When the Rigidbody parent is moved around by forces, the child Colliders move along with it. The primitive Colliders will collide with the environments Mesh Collider, and the parent Rigidbody will alter the way it moves based on forces being applied to it and how its child Colliders interact with o

16、ther Colliders in the Scene.上图中,枪的模型运用了混合碰撞,混合碰撞最好应用于地形或者形状复杂的物体。这个枪模型附加了刚体,还有带有简单碰撞的子游戏对象,当刚体移动的时候,子碰撞也随之移动。Mesh Colliders cant normally collide with each other. If a Mesh Collider is marked as Convex, then it can collide with another Mesh Collider. The typical solution is to use primitive Collider

17、s for any objects that move, and Mesh Colliders for static background objects.通常mesh碰撞不能相互碰撞。如果mesh碰撞是明显凸起的,那么它可以相互碰撞。典型的解决方法是在每个子对象上附加简单碰撞。Hints提示 To add multiple Colliders for an object, create child GameObjects and attach a Collider to each one. This allows each Collider to be manipulated indepen

18、dently.给一个物体添加碰撞时,创建多个子游戏对象并给每个对象添加碰撞,允许每个部位自由控制。 You can look at the gizmos in the Scene View to see how the Collider is being calculated on your object.你可以在场景视图中观察你建立的对象的碰撞。 Colliders do their best to match the scale of an object. If you have a non-uniform scale (a scale which is different in each

19、 direction), only the Mesh Collider can match completely.尽可能的调整好每个物体的碰撞,只有mesh碰撞才能完全匹配。 If you are moving an object through its Transform component but you want to receive Collision/Trigger messages, you must attach a Rigidbody to the object that is moving.Advanced高级阶段Collider combinations碰撞组合There

20、are numerous different combinations of collisions that can happen in Unity. Each game is unique, and different combinations may work better for different types of games. If youre using physics in your game, it will be very helpful to understand the different basic Collider types, their common uses,

21、and how they interact with other types of objects.在Unity中,有许多不同的碰撞组合。每个游戏都是唯一的,不同的碰撞组合适应不同类型的游戏。如果你在你的游戏里利用物理系统,将会很好的让你了解不同的碰撞类型,和共同点。还有他们是怎么结合每个物体类型的。Static Collider静态碰撞These are GameObjects that do not have a Rigidbody attached, but do have a Collider attached. These objects should remain still, o

22、r move very little. These work great for your environment geometry. They will not move if a Rigidbody collides with them.这种游戏对象没有附加刚体,但附加了碰撞。这些对象保持静止或只移动一点点。他们不会自己移动,除非有刚体碰撞碰到了他们。Rigidbody Collider刚体碰撞These GameObjects contain both a Rigidbody and a Collider. They are completely affected by the phys

23、ics engine through scripted forces and collisions. They might collide with a GameObject that only contains a Collider. These will likely be your primary type of Collider in games that use physics.这种游戏对象包含了刚体和碰撞2部分。他们从头到尾都受到物理系统的影响。他们可以影响只带有碰撞的游戏对象。这是主要的在游戏里使用物理系统的碰撞类型。Kinematic Rigidbody Collider刚体运

24、动碰撞This GameObject contains a Collider and a Rigidbody which is marked IsKinematic. To move this GameObject, you modify its Transform Component, rather than applying forces. Theyre similar to Static Colliders but will work better when you want to move the Collider around frequently. There are some o

25、ther specialized scenarios for using this GameObject.This object can be used for circumstances in which you would normally want a Static Collider to send a trigger event. Since a Trigger must have a Rigidbody attached, you should add a Rigidbody, then enable IsKinematic. This will prevent your Objec

26、t from moving from physics influence, and allow you to receive trigger events when you want to.Kinematic Rigidbodies can easily be turned on and off. This is great for creating ragdolls, when you normally want a character to follow an animation, then turn into a ragdoll when a collision occurs, prom

27、pted by an explosion or anything else you choose. When this happens, simply turn all your Kinematic Rigidbodies into normal Rigidbodies through scripting.If you have Rigidbodies come to rest so they are not moving for some time, they will fall asleep. That is, they will not be calculated during the

28、physics update since they are not going anywhere. If you move a Kinematic Rigidbody out from underneath normal Rigidbodies that are at rest on top of it, the sleeping Rigidbodies will wake up and be correctly calculated again in the physics update. So if you have a lot of Static Colliders that you w

29、ant to move around and have different object fall on them correctly, use Kinematic Rigidbody Colliders.Collision action matrix碰撞矩阵Depending on the configurations of the two colliding Objects, a number of different actions can occur. The chart below outlines what you can expect from two colliding Obj

30、ects, based on the components that are attached to them. Some of the combinations only cause one of the two Objects to be affected by the collision, so keep the standard rule in mind - physics will not be applied to objects that do not have Rigidbodies attached.把2个对象的碰撞进行相应的配置,就会得到许多的结果。下图表述2个对象碰撞是否

31、能结合一起。Collision detection occurs and messages are sent upon collision碰撞检测和传送碰撞信号Static Collider静态碰撞Rigidbody Collider刚体碰撞KinematicRigidbody Collider刚体运动碰撞StaticTrigger Collider静态碰撞触发RigidbodyTrigger Collider刚体碰撞触发Kinematic RigidbodyTrigger Collider刚体运动碰撞触发Static Collider静态碰撞YRigidbody Collider刚体碰撞YY

32、YKinematic Rigidbody Collider刚体运动碰撞YStatic Trigger Collider静态碰撞触发Rigidbody Trigger Collider刚体碰撞触发Kinematic Rigidbody Trigger Collider刚体运动碰撞触发Trigger messages are sent upon collision触发时发送的触发信号Static Collider静态碰撞Rigidbody Collider刚体碰撞KinematicRigidbody Collider刚体运动碰撞StaticTrigger Collider静态碰撞触发Rigidbo

33、dyTrigger Collider刚体碰撞触发Kinematic RigidbodyTrigger Collider刚体运动碰撞触发Static Collider静态碰撞YYRigidbody Collider刚体碰撞YYYKinematic Rigidbody Collider刚体运动碰撞YYYStatic Trigger Collider静态碰撞触发YYYYRigidbody Trigger Collider刚体碰撞触发YYYYYYKinematic Rigidbody Trigger Collider刚体运动碰撞触发unity 角色动画2010-08-31 02:18:33|分类: U

34、nity |标签: |字号大中小订阅 来源: Character Animation角色动画Unity Manual User Guide Creating Gameplay Character AnimationUnity手册 使用指南 创建游戏 角色动画Unitys Animation System allows you to create beautifully animated skinned characters. The Animation System supports animation blending, mixing, additive animations, walk c

35、ycle time synchronization, animation layers, control over all aspects of the animation playback (time, speed, blend-weights), mesh skinning with 1, 2 or 4 bones per vertex and finally physically based ragdolls.Unity的动画系统允许你创建漂亮的动画角色.动画系统支持动画合成,混合,添加动画,步调周期时间同步,动画层,控制所有方面的动画回放(时间,速度,混合-偏重),网格面每个三角有1,

36、2或4个骨骼,且完成基本的物理玩偶.There are some best practices for creating a rigged character with optimal performance in Unity. It is recommended that you read about these techniques on the Modeling Optimized Characters page.这里有一些最好的方法创建一个作弊的角色在Unity获得最好的展示.推荐你阅读下Modeling Optimized Characters页面上的教程。Making an ani

37、mated character involves two things; moving them through the world and animating them accordingly.制作一个动画角色需要2个东西;移动他在世界中和做相应的动作.This page focuses on the animation. If you want to learn more about moving characters around (for a Super Mario Bros style game or a first-person shooter), take a look at t

38、he Character Controller page.这个页面致力于动画.如果你想要学习更多关于移动角色的(为一个超级玛丽风格游戏或第一人称射击),查看Character Controller page.If you like, quickly jump to one of the topics covered on this page: ortAnim#ImportAnimImporting Character Animations ortSplit#ImportSplitAnimation Splitting ortFile#ImportFileMultiple Files ortIK

39、#ImportIKInverse Kinematics Inserting Into a Unity Scene Animating the Character Animation Blending Animation Layers Additive Animation如果你喜欢,直接跳到一个在这个页面的标题: 输入角色动画 动画片段 多个文件 反向运动 插入Unity场景 使角色做动作 动画混合 动画层 添加动画You can download an example demo showing pre-setup animated characters here.你能在here下载演示动画角色

40、设置的例子example demo。Importing The Animations输入动画First of all we have to import the character. Unity natively imports Maya (.mb or .ma) files, Cinema 4D (.c4d) files, and fbx files which can be exported from most animation packages. Click here to learn how to ortObject.htmlexport from your modelling/an

41、imation package.首先我们输入动画。Unity支持输入Maya (.mb or .ma)文件, Cinema 4D (.c4d)文件,和fbx文件,这些能输出为很多动画包.点击这里学习怎样输出模型/动画包ortObject.htmlexport from your modelling/animation package.Importing Animations using Animation Splitting输出动画使用动画片段The most convenient way for animators to work is to have a single model cont

42、aining all animations. When importing the animated model, you can define which frames make up each part of the animation. Unity will automatically split the animation into the individual parts, called Animation Clips.最方便的制作动画的方法是使用单一的模型包含所有的动画.当输入动画模型,你能定义每部分动画的帧.Unity将自动把动画片段分成单个动作部分,名为动画片段Animatio

43、n Clips.For example: walk animation during frames 1 - 33 run animation during frames 41 - 57 kick animation during frames 81 - 97例如: 走路动画在帧1 -33 跑步动画在帧41 57 踢的动画在帧81 - 97To import the animations you simply place the model in the Assets folder of your project. Unity will now automatically import it.

44、Highlight it in the Project View and edit the Import Settings in the Inspector.输入动画你可以直接放置他到工程里的Assets文件夹.Unity将自动输入他.突出显示他在工程视图和编辑输入设置在检视视图.The Import Settings Dialog for a mesh一个模型的输入设置对话框In the Import Settings, the Split Animations table is where you tell Unity which frames in your asset file mak

45、e up which Animation Clip. The names you specify here are used to activate them in your game.在输入设置, Split Animations表是告诉Unity你的资源文件的哪些帧是表示哪些动画片段的.你指定在这里的名字在你的游戏使用触发他们.nameDefines the Animation Clips name within Unity.first frameThe first frame of the animation. The frame number refers to the same fr

46、ame as in the 3D program used to create the animation.last frameThe last frame of the animation.loop frameIf enabled, an extra loop frame is inserted at the end of the animation. This frame matches the first frame in the clip. Use this if you want to make a looping animation and the first & last fra

47、mes dont match up exactly.名字定义Unity里动画片段的名字.起始帧动画的起始帧.帧数值和创建动画的3D程序使用相同的帧.终止帧动画的终止帧循环帧如果激活,额外的循环帧插入到动画的最后.这个帧匹配片段的起始帧.如果你想要制作一个循环动画和起始&终止帧不是很准确的匹配时.Importing Animations using multiple model files输入动画使用多个模型文件The other way to import animations is to follow the animation naming scheme. You create separ

48、ate model files and use this naming convention: model nameanimation name.fbx另一个输入动画的方法是在动画名后面加.你创建单独的模型文件和使用这种命名方法模型名字动画名字.fbxAn example of four animation files for an animated character有4个动画文件的动画角色例子Unity automatically imports all four files and collects all animations to the file without the sign

49、in. In the example above, the goober.mb file will be set up to reference idle, jump, walk and wallJump automatically.Unity自动输入所有4个文件并收集所有动画到没有标签的文件.在上面的例子里, goober.mb将自动建立空闲,跳跃,走路和翻墙的引用.Importing Inverse Kinematics输入反向运动When importing animated characters from Maya that are created using IK, you have

50、 to check the Bake IK & simulation box in the Import Settings. Otherwise, your character will not animate correctly.当输入动画角色使用Maya会创建使用IK,你可以检查Bake IK & simulation盒在输入设定.否则你的角色将不能正常运动.Bringing the character into the Scene放置角色到场景When you have imported your model you drag the object from the Project vi

51、ew into the Scene View or Hierarchy.当你输入模型后,拖拽物体从工程视图到场景视图或层次视图.The animated character is added by dragging it into the scene动画角色通过拖拽添加到场景The character above has three animations in the animation list and no default animation. You can add more animations to the character by dragging animation clips

52、from the Project View on to the character (in either the Hierarchy or Scene View). This will also set the default animation. When you hit Play, the default animation will be played.上面角色的三个动作列表不是缺省动作.你能添加更多动画到角色通过在工程视图的角色中拖拽动画片段(到层次或场景视图).这也将设置缺省动画.当你按下运行,缺省动画将运行.TIP: You can use this to quickly test

53、 if your animation plays back correctly. Also use the Wrap Mode to view different behaviors of the animation, especially looping.技术:你能使用这个快速测试,如果你的动画重播正常.也可使用卷模式Wrap Mode观察不同的动画行为.特别是循环.Animating the Character使角色动起来The actual animating of characters is done through Unitys scripting interface.真实的角色动画

54、使用Unity脚本接口执行.Animation Blending动画合成In todays games, animation blending is an essential feature to ensure that characters have smooth animations. Animators create separate animations, e.g. a walk cycle, run cycle, idle animation or shoot animation. At any point in time in your game you need to be ab

55、le to transition from the idle animation into the walk cycle and vice versa. Of course you dont want any sudden jumps in the motion, you want the animation to smoothly transition.现在的游戏,动画合成是一个必不可少的特征为确保角色有平滑的动画.动画师创建单个动画,如走路循环,跑步循环,空闲动画或射击动画.有些时候你的游戏需要能转换空闲动画到走路循环或反之.当然你不想要在运动中有突然的跳跃,你想要动画平滑转换.This is where animation blending comes in. In Unity you can have an arbitrary amount of animations playing on the same character. All animations are blended or added together to generate the f

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论