付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Transforms UnityManualUserGuideCreatingGameplay Transforms areakeyComponent ineveryGameObject.Theydic Transforms UnityManualUserGuideCreatingGameplay Transforms areakeyComponent ineveryGameObject.Theydic ewheretheGameObjecthowitisro ed, anditsscale.ItissibletohaveaGameObjectransform.YoucanadjustTran
2、sformofanyGameObjectfromtheSceneView,theInspector,orthroughTransforms是一个关键组件在每个GameObject里。它们指定GameObject TheremainderofthispagestextisfromtheTransformComponentReference Transform TheTransformComponentdeterminestheition,ion,andScaleofallheEverysa TheTransformComponentisviewableand在检视器里,Transform 组件是
3、可视与可编辑的Properties 属he位itionoftheTransforminX,Y,andZ与x,y,zTransform旋ionRo ionoftheTransformaroundtheX,Y,andZaxes,measuredinTransform围绕x,y,zScaleoftheTransformalongX,Y,andZaxesValue1istheoriginalsize(sizeatwhichtheobject was imported).沿 x,y,z 轴变换伸缩。值为 1 是原始大小(在该对象导入时的大小)缩AllpropertiesofaTransformareme
4、asuredrelativetotheTransformsparent.IftheTransformhasnothepropertiesareAllpropertiesofaTransformaremeasuredrelativetotheTransformsparent.IftheTransformhasnothepropertiesaremeasuredrelativetoWorldUsingTransforms 使用变换Transformsarealwaysmanipulatedin3DspaceusingX,Y,andZaxes.InUnity,theseaxesarebythecol
5、orsred,green,andbluerespectively.Remember:XYZ= Color-coded relationship n 3 axes and Transform properties 色标3 个轴与变换组件之间的关系TransformComponentscanbedirectlymanipulatedusingtheSceneViewortheInspector.TheInspectorlistthepropertiess edaboveforeasyediting.YousomodifyTransformsinyourScenewiththem,usingtheM
6、ove,Ro e,andScaletools.ThesetoolsareUnityheupperndcornerof TheViewTranslateRo eandScaletools 查看,变换,旋转机伸缩工Thetoolswillbeusableonanyobjectinyourscene.Clickontheobject,andyouwillseethetoolgizmoaroundit.Dependingonthecurrenttool,thegizmowilllookslightlydifferent.ClickingtheobjectwillalsotheTransformcomp
7、onenteheInspector.IftheInspectordoesnotdisplaythecomponentoritsproperties,thenyoudoveanobjectheScene平移工具-旋转工具-缩放工具-AllthreeGizmoscanbedirectlyeditedinSceneView. To平移工具-旋转工具-缩放工具-AllthreeGizmoscanbedirectlyeditedinSceneView. TomanipulatetheTransform,clickanddragononeofthe3gizmoaxes,youllnoticeitscolo
8、rchanges.Asdrag the mouse,you will see the object translate,ro e, or scale alongthe axis. When you release thebutton,youllttheaxisected.YoucanclickthemiddlemousebuttonanddragthetomanipulatetheTransformalongtheselectedaxis.Toofall3sall3axesatonceclickanddragtheAny individual axis 时eselectedwhenyoucli
9、ckonit 的轴将变为选取状态当你在它上面Parenting 父类Parenting is one of the most important concepts to understand when using Unity. When a GameObject is a ParentofanotherGameObject,theChildGameObjectwillmove,ro e,andscaleexactlyasitsParentdoes. Just like your arms are attached to your body, when you turn your body, y
10、our arms move because theyreattached.Anyobjectcanhavemultiplechildren,butonlyone YoucancreateaParentbydragginganyheHierarchyViewontoanother.Thiswillcreate nthetwo YoucancreateaParentbydragginganyheHierarchyViewontoanother.Thiswillcreate nthetwo Areal-worldleofaParent-Childhierarchy.AlltheGameObjects
11、rrowstotheleftare heabovele,wetthearmsareparentedtothebody,andthehandsareparentedtotheThescenesyoumakeinUnitywillcontaincollectionsoftheseTransformhierarchies.ThetopmostobjectiscalledtheRootobject.Whenyoumove,scale,orro eaparent,allthechangesinitsTransformare app d to its children as well.在上面的例子里说胳膊
12、是身体的父,以及手是胳膊的父。在Unity里你创造的场景将包含这些变换层次Itisworthpo ing ttheTransformheInspectorofanyChildGameObjectarerelativetotheParentsTransformvalues.ThesearealsocalledtheLocalCoordinates.Throughscripting,canstheGlobalCoordinatesaswellastheLocal 过Youcanbuildcompoundobjectsbyparentingmultipleseparateobjectstogethe
13、r,liketheskeletalstructureofhumanragdoll.Yousocreatesmallyeteffectiveobjectswithsingleparents.Forle,ifyouhavettakesplaceatnight,youcancreateaneffectiveatmosphereflashlight.Tocreateobject,youwouldparentaspotlightTransformtotheflashlightTransform.Then,anyalterationoftheTransformwillaffectttakesplaceat
14、night,youcancreateaneffectiveatmosphereflashlight.Tocreateobject,youwouldparentaspotlightTransformtotheflashlightTransform.Then,anyalterationoftheTransformwillaffectthespotlight,creatingaconvincingflashlightImportanceofScale 缩放的重ThescaleoftheTransformdeterminesthedifferencenthe sizeofyourmeshinyoura
15、pplication,andthesizeofyourmeshinUnity.ThemeshssizeinUnity(andthereforetheTransformsisveryimportant,llyduringphysicssimulation.Thereare3tcandeterminetheScaleof转换的伸缩确定你的模型程序里的网格大小与Unity里的网格大小之间的不同。在Unity里的网格大小( Thesizeofyourmeshinyour3Dingapplication. 3DTheMeshScaleFactorheobjectsImportSettings. TheS
16、calevaluesofyourTransformComponent. Ideally,youshouldnotadjusttheScaleofyourheTransformComponent.Thebestoptionistoyoursatreal-lifescale,soyouvetochangeyourTransformsscale.Thesecond-bestoptiontoadjustthescaleatwhichyourmeshisheImportSettingsforyourindividualmesh.optimizationsoccurbasedontheimportsize
17、,andinstantiatingansanadjustedscalevaluedecreaseperformance.Formoreinformation,readthroughtheRigidbodycomponentssectionons WhenparentingTransforms,puttheparentslocationat0,0,0beforeapplyingthechild.Thiswill save you many headaches later. ParticleSystemsarenotaffectedbytheTransformsScale.InordertoscaleaParticleyouneedtomodifytheheSystemsParticleEmitter,Animatorand粒子系统不受变化伸缩的影响。为了伸缩一个粒子系统,你需要修改属性在粒子系统里IfyouareusingRigidbodiesforphysicssimulation,thereissomeimportantIfyouareusingRigidbodiesforphysicssimulation,thereissomeimportanti
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- JIS D 9419-2010 自行车.轮毂 标准Bicycles -Hubs
- 2026春季梦想靠岸招商银行江门分行校园招聘备考考试试题附答案解析
- 心梗患者疼痛管理的新进展与应用
- 2026云南玉溪暨达职业技能培训学校有限公司就业见习岗位招募3人参考考试题库附答案解析
- 2026广东湛江市坡头区坡头镇人民政府招聘政府雇员(非编制人员)1人备考考试题库附答案解析
- 2026年贵州省省、市两级机关公开遴选公务员357人参考考试题库附答案解析
- 2026福建宁德福鼎市前岐中心幼儿园招聘参考考试试题附答案解析
- 2026福建省闽侯白沙国有林场招聘劳务派遣护林员1人备考考试题库附答案解析
- 生产车间技改创新制度
- 酒厂生产环保管理制度
- 低蛋白血症患者的护理讲课件
- 建设工程招投标培训课件
- T/ZGZS 0302-2023再生工业盐氯化钠
- 2025年上海市公务员《行政职业能力测验(A卷)》试题(网友回忆版)
- 健康骨骼课件
- GB/T 7573-2025纺织品水萃取液pH值的测定
- 水泵电机年度维修项目方案投标文件(技术方案)
- 2024-2025学年江西省南昌市高二上学期期末联考数学试卷(含答案)
- GB/T 6075.6-2024机械振动在非旋转部件上测量评价机器的振动第6部分:功率大于100 kW的往复式机器
- 【生物】种子的萌发-2024-2025学年七年级生物下册同步教学课件(人教版2024)
- 电梯安全使用登记与定期检验管理制度
评论
0/150
提交评论