unity3d官方汽车教程的翻译版本car2

unity3d官方汽车教程的翻译版本car2

ID:34469349

大小:2.39 MB

页数:20页

时间:2019-03-06

unity3d官方汽车教程的翻译版本car2_第1页
unity3d官方汽车教程的翻译版本car2_第2页
unity3d官方汽车教程的翻译版本car2_第3页
unity3d官方汽车教程的翻译版本car2_第4页
unity3d官方汽车教程的翻译版本car2_第5页
资源描述:

《unity3d官方汽车教程的翻译版本car2》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、“TheCarTutorial”Part2CreatingaRacingGameforUnity在Unity中创建赛车游戏Part2:TweakingtheCar调整汽车Ifyou’vefollowedalongpart1ofthistutorialandassembledthecar,youarealreadyatapointwherethecarisprettyawesome.Butifyouhavedrivenitaroundabit,youwillprobablyhavenoticedthatthereisafterallroomforsomeimprovement.

2、如果你已经跟着教程的Part1部分学完并组装了汽车,那么在这个非常不错的汽车这里你已经做好了准备,但如果你驾驶它已经开了一点,你将可能会注意到还有一些可以改进的地方。Thisiswheretweakingentersthepicture.Ingamedevelopmenttweakingisacrucialpartofmakingyourgamefun,challenging,awesomeorwhatevergoalyouhaveforyourspecificgame.Theideaisthatwhenyouhavesetupthenutsandboltsthatmakes

3、yourgamerun,theremightbesomethingthatdoesn’tfeelquiteright-maybeyouwantthecarhandlingtobeabitdifferent,maybeyouwantthetopspeedtobeslightlydifferent,ormaybeyouwanttochangethescenelights.这是一个要调整进入的地方的图片,在游戏中,开发调整会使你的游戏更有趣,更具挑战性,更棒或你想在游戏中实现任何目标的一个最关键部分。这个想法就是当你设置螺栓和螺母使你的游戏能运行时,那里有一些东西你可能感觉不怎么正

4、确--也许你想让赛车的操控有一点不同,也许你希望的最高速度稍为有点不同,或者也许你只想改变场景内的灯光。AmajorstrengthofUnityisit’stweakability-asyouhaveseen,allthepublicvariablesinyourscriptsareshownintheinspector,soyoucanchangevalueswithoutgoingintothecode.Andevenmorepowerful:Whenyou’vemadeachangeyoujusthitplay,andyouwillinstantlyseetheres

5、ultofthatchange.Youneverhavetowaitforthescenetoberebuiltorforamajorrecompileofthecode.一个Unity引擎的实力是它的可调整性--像你看到的那样,在你的脚本中所有的公共变量在都显示在检查面板上,所以你能改变这些变量的值而不需要深入代码,并且更强大的是:当你有了改变时你只需点击播放,你会立即看到这种变化的结果,你不用等待场景被重构或等引擎重编译代码。CenterofMass质心Nowthemostobviousthingthatneedstobetweakedisprobablythatthec

6、arcanveryeasilybeflippedaroundwhenturning(ifyouhaven’ttriedyet,thenplayagainandspeedupabitandthenturnfromsidetosidewhilespeeding-thecarwillflipoverprettyeasily).Thereasonforthisflippingisthatwehaven’tyetdefinedthecar’scenterofmass.AlltheforcesthatareappliedtotheRigidbodyofthecar,areallappli

7、edattheRigidbody’scenterofmass.ThecenterofmassoftheRigidbodywillbecalculatedbyUnityaccordingtotheCollidersattachedtotheRigidbody,eitheronthesameGameObjectoronchildobjects.Sincethecenterofmassofacaristypicallynotthecenterofthecar(andprobablynotthecenterof

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。