Unity官网>Learn>Toturial>Topic笔记

来源:互联网 发布:java视频教程马士兵 编辑:程序博客网 时间:2024/06/08 13:27

1.Tags和Layers

为物体设置tag,利用tag快速获取游戏对象
为物体设置layer,camera中cull mask, 射线检测等,可以限制到具体layer中的物体

2.Sprite

动画图集设置:
Sprite>SpriteMode:Multiple>SpriteEditor>Slice>Type:GridByCellSize>PixelSize

3.Joint

hingle joint :连接器,例如门
are effect:区域影响器,例如风
bounce 和slide : 使用Physic Material,设置Friction 和 Bounciness大小
point effect :点区域力影响

4.Blend Tree

animaition : window>animation>拖拽图集中图片>保存为animation
animator:parameters>+>float
blend tree : animator>右键>create state>from new blend tree>blend type:1D>parameters:新建的变量float>auto threold:否>设置区间大小>motion:animation>threold:区间里的数值
代码里设置float数值大小,切换blend tree中对应数值的animation