锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧美日韩精品久久久,午夜精品久久99蜜桃的功能介绍,欧美午夜宅男影院http://www.shnenglu.com/ming81/zh-cnSun, 16 Nov 2025 07:36:26 GMTSun, 16 Nov 2025 07:36:26 GMT60(鎼繍宸?Windows涓媀SCode渚挎惡寮廲/c++鐜 http://www.shnenglu.com/ming81/archive/2017/05/13/214932.html鐐圭偣婊存淮鐐圭偣婊存淮Sat, 13 May 2017 03:55:00 GMThttp://www.shnenglu.com/ming81/archive/2017/05/13/214932.htmlWindows涓媀SCode渚挎惡寮廲/c++鐜

鏇存柊錛?/p>

  • 淇鍦ㄥ惈鏈夌┖鏍肩殑鐩綍涓嬫棤娉曟甯哥紪璇戠殑bug
  • 淇敼紼嬪簭鐨勮繍琛岀洰褰曚負(fù)紼嬪簭鎵鍦ㄧ洰褰?/li>
  • 宸茬煡bug錛氭枃浠跺悕鍚湁絀烘牸鐨勬棤娉曟甯哥紪璇戯紝鏆傛椂娌℃湁濂界殑瑙e喅鏂規(guī)

鏇存柊鏂瑰紡錛?nbsp;
1.涓嬭澆setup.bat鏂囦歡鐩存帴鏇挎崲鍘熸枃浠訛紝鐒跺悗榪愯涓嬈etup.bat:

setup.bat涓嬭澆錛?nbsp;
閾炬帴錛?a target="_blank" style="text-decoration: none; box-sizing: border-box; color: #0c89cf;">http://pan.baidu.com/s/1mhPED6K 
瀵嗙爜錛?6sx

2.涓嬭澆瀹屾暣vscode鍖咃細(xì)

瀹屾暣vscode涓嬭澆錛?nbsp;
鐧懼害浜戜笅杞介摼鎺ワ細(xì)http://pan.baidu.com/s/1dFt6uoL 
瀵嗙爜錛歩s83


榪欓噷鍐欏浘鐗囨弿榪? title= 
榪欐槸VSCode緙栧啓璋冭瘯c/cpp紼嬪簭鐨勪究鎼哄紡鑷姩閰嶇疆鐜銆?/p>

  • c/cpp鐨勭紪璇戝櫒錛坓cc錛実++錛?/li>
  • 璋冭瘯鍣紙gdb錛?/li>
  • vscode
  • 鑷姩閰嶇疆鑴氭湰

棣栨浣跨敤鍙屽嚮setup.bat榪涜鑷姩閰嶇疆錛屼互鍚庢瘡嬈℃墦寮VSCode.bat鍗沖彲銆?/strong>

setup.bat浼?xì)鍚戝綋鍓嶇敤鎴风殑鏂囦欢澶瑰唴鎷疯礉涓浜涙枃浠訛紙cpptool錛夌敤浜庨厤緗紝璇風(fēng)‘淇濇嫢鏈夎凍澶熸潈闄愩?/p>

鍐呯疆鐨凱roject鏂囦歡澶逛負(fù)榛樿鐨勯」鐩枃浠跺す錛屽叾涓緗簡(jiǎn)涓涓猦elloworld嫻嬭瘯紼嬪簭銆?/p>

鏈夌枒闂鑱旂郴Blackkitty

鐧懼害浜戜笅杞介摼鎺ワ細(xì)http://pan.baidu.com/s/1dFt6uoL 
瀵嗙爜錛歩s83



]]>
(鎼繍宸?Mangos浠g爜闃呰 http://www.shnenglu.com/ming81/archive/2016/12/16/214503.html鐐圭偣婊存淮鐐圭偣婊存淮Fri, 16 Dec 2016 03:28:00 GMThttp://www.shnenglu.com/ming81/archive/2016/12/16/214503.html

閫昏緫灞傦細(xì) 綾籛orld瀹炵幇浜?jiǎn)wow鐨刉orld錛屾墍鏈夌殑閫昏緫澶勭悊
銆銆MaNGOS 涓嬭澆錛岀紪璇戯紝閰嶇疆鍜岃繍琛岀殑鍩烘湰姝ラ 涓嬭澆鍜屽畨瑁卪sysgit錛岀敤浜庝唬鐮佺鐞嗘垜浣跨敤鐨勬槸Git-1.6.5.1-preview20091022.exe 
銆銆涓嬭澆鍜屽畨瑁卼ortoisegit錛岀敤浜庝唬鐮佺鐞嗘垜浣跨敤鐨勬槸TortoiseGit-1.3.2.0-32bit.msi 
銆銆浣跨敤git://github.com/mangos/mangos.git錛屼粠github鎻愬彇mangos浠g爜 
銆銆閲囩敤Git GUI宸ュ叿鐨凜lone Existing Repository錛屽緱鍒?mangos浠g爜錛堟垜鐨勬槸9560錛屽畨瑁匲DB鍙傝冭繖錛?nbsp;
銆銆浣跨敤git://github.com/scriptdev2/scriptdev2.git錛屼粠github鎻愬彇scriptdev2浠g爜 
銆銆閲囩敤Git GUI宸ュ叿鐨凜lone Existing Repository錛屽緱鍒?scriptdev2浠g爜. 
銆銆緙栬瘧mangos鎴戠敤鐨勬槸VC9,鎵撳紑mangoswinmangosdVC90.sln榪涜鏋勯狅紝鏋勯犲畬鎴愬悗錛屼細(xì)寰楀埌mangosbinWin32_Debug鏂囦歡澶?nbsp;
銆銆緙栬瘧scriptdev2鎴戠敤鐨勬槸VC9,鎵撳紑mangoswinscriptdev2VC90.sln榪涜鏋勯狅紝鏋勯犲畬鎴愬悗錛屼細(xì)寰楀埌scriptdev2binWin32_Debug鏂囦歡澶逛篃鍙弬鑰?nbsp;
銆銆pandore 
銆銆鎷瘋礉mangossrcmangosd鐩綍涓嬬殑mangosd.conf.dist.in涓簃angosbinWin32_Debugmangosd.conf 
銆銆鎷瘋礉mangossrcrealmd鐩綍涓嬬殑realmd.conf.dist.in涓簃angosbinWin32_Debugrealmd.conf 
銆銆浠巋ttp://www.wowtaiwan.com.tw/涓嬭澆鍜屽畨瑁呭彴鏈峎OW錛屽茍鍗囩駭鍒版渶鏂扮増鏈垜浣跨敤鐨勬槸鍙版湇WOW 3.3.2 build 11403 
銆銆錛岄噰鐢∕aNGOS鐨勫伐鍏穉d浠巜ow鐨凪PQ涓娊鍙杕ap錛屽緱鍒扮殑鎵鏈夌殑map鏁版嵁鏂囦歡錛屾枃浠跺懡鍚嶈鑼冧負(fù)map_id錛?浣嶏級(jí) tileY錛?浣嶏級(jí) tileX錛?浣嶏級(jí).map錛屽鏂囦歡鍚嶄負(fù)0002035.map錛屼唬琛ㄧ殑鏄疉zeroth(鍦板浘id涓?00錛宼ile鍧愭爣涓?35,20). 娉細(xì)WOW瀹㈡埛绔殑Tile瀵瑰簲mangos涓殑grid錛學(xué)OW瀹㈡埛绔殑Chunk瀵瑰簲mangos涓殑cell(1cell = 4 chunk) 
銆銆鎸夌収甯歌嫻佺▼錛堝寘鎷緩绔嬫暟鎹簱鍜岄厤緗湇鍔″櫒錛夋妸鏈嶅姟鍣ㄨ窇璧鋒潵錛屼嬌鐢╝ccount create zzh1234567 zzh1234567 鍒涘緩涓涓處鍙鳳紝浣跨敤account set gmlevel zzh1234567 3璁劇疆涓鴻秴綰х敤鎴?nbsp;
銆銆閰嶇疆濂藉鎴風(fēng)鍚庯紝榪愯W(xué)OW錛岄『鍒╃櫥闄嗭紝鍛靛懙 
銆銆閫氳繃瀹夎UDB鏉ヤ赴瀵屽満鏅疐ULL DB 9560 : HERE錛屽弬鑰冭繖錛屽湪鎴戝畨瑁匘B9560鐨勬椂鍊欙紝鍙戠幇Mangos鍦↙oadCreatureAddons鐨勬椂鍊欙紝鍔犺澆creature template addons鍑洪敊錛孧angos鍙姹俢reature template addons鏈?涓瓧孌碉紝鑰宑reature template addons鏈?涓瓧孌墊垜鐜板湪鍙槸綆鍗曞湴璺寵繃LoadCreatureAddons鐨勮皟鐢?nbsp;
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src= 
榪愯Mangos 錛堣繍琛孧angos涓鑺傝繃鏈燂紝鏄互鍓嶆垜閽堝鍥芥湇3.1.3鐗堟湰榪涜鐨勫畨瑁呴厤緗級(jí) 錛岄噰鐢∕aNGOS鐨勫伐鍏穉d浠巜ow鐨凪PQ涓娊鍙杕ap錛屽緱鍒扮殑鎵鏈夌殑map鏁版嵁鏂囦歡錛屾枃浠跺懡鍚嶈鑼冧負(fù)map_id錛?浣嶏級(jí) tileY錛?浣嶏級(jí) tileX錛?浣嶏級(jí).map錛屽鏂囦歡鍚嶄負(fù)0002035.map錛屼唬琛ㄧ殑鏄疉zeroth(鍦板浘id涓?00錛宼ile鍧愭爣涓?35,20). 娉細(xì)WOW瀹㈡埛绔殑Tile瀵瑰簲mangos涓殑grid錛學(xué)OW瀹㈡埛绔殑Chunk瀵瑰簲mangos涓殑cell(1cell = 4 chunk) 
銆銆閰嶇疆濂藉鎴風(fēng)鍚庯紝榪愯W(xué)OW錛岄『鍒╃櫥闄嗭紝鍛靛懙 
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src= 
Mangos浠g爜闃呰 
銆銆Mangos鏈?3涓伐紼?nbsp;
銆銆浣跨敤浜?涓閮ㄥ伐鍏峰簱錛屽垎鍒槸錛?璺ㄥ鉤鍙扮殑緗戠粶閫氳妗嗘灦The ADAPTIVE Communication Environment (ACE) 
銆銆鍘嬬緝搴搝lib 
銆銆Socket閫氫俊搴?C++ Sockets Library (浣跨敤鍦╮ealmd宸ョ▼涓紝鍜屼嬌鐢ㄥ湪Mangosd宸ョ▼涓殑RASocket錛岃礋璐e鐞哛emote Administration鍏朵粬鍦版柟娌℃湁浣跨敤鍒拌繖涓狢++ Sockets Library 錛夊彂鐜板湪C++ Sockets Library鐨凾cpSocket::Open涓瓨鍦ㄤ竴涓棶棰橈紝鍦╪ = connect(s, ad, ad);璇彞鎵ц鍚庯紝濡傛灉n=-1錛孋++ Sockets Library浼?xì)妫嫻嬫槸鍚RR涓篧SAEWOULDBLOCK錛屽惁鍒欒〃紺烘垚鍔燂紝浣嗗湪鍔ㄦ佸簱涓嬌鐢═cpSocket鐨勬椂鍊欙紝鎴戝彂鐜皀 = connect(s, ad, ad);璇彞鎵ц鍚庯紝n=-1錛孍RR浼?xì)湄?fù)0錛岃繖涓椂鍊欒繛鎺ヤ篃鏄垚鍔熶簡(jiǎn)錛屼絾TcpSocket::Open浼?xì)褰撳仛涓嶆垚鍔熷鐞嗘垜鍙戠幇杩欎釜闂锛屼絾娌℃湁鏃堕棿鍘绘帰绌跺師鍥犲Q屼篃璁稿茍涓嶆槸涓涓棶棰?nbsp;
銆銆C++鐨勫茍琛岀紪紼嬫ā鏉垮簱Threading Building Blocks 錛坱bb 鍜?tbbmalloc錛?nbsp;
銆銆Mangos鐨勫疄鐜板垎涓猴細(xì)鐧誨綍鏈嶅姟鍣紙realmd錛夊拰涓栫晫鏈嶅姟鍣紙mangosd+game錛塺ealmd鍜宮angos鍏辯敤浜?jiǎn)Mangos鍏叡搴擄紙shared錛?nbsp;
銆銆宸ョ▼shared 
銆銆鎻愪緵浜?jiǎn)閫氱敤鍔熻兘錛屽寘鎷簡(jiǎn)鏁版嵁搴撶殑灝佽綾伙紝瀹炵幇浜?jiǎn)瀵筂ySql鐨勮闂紝鍚屾牱錛屾垜浠彲浠ョ紪鍐欐淳鐢熺被鏉ユ敮鎸佸叾浠栫殑鏁版嵁搴?nbsp;
銆銆宸ョ▼script 
銆銆鎻愪緵浜?jiǎn)鑴氭湰鎺ュ彛锛岒q跺疄鐜頒簡(jiǎn)綆鍗曠殑鍑犱釜鑴氭湰錛屽皝瑁呬負(fù)DLL錛屾彁渚涚粰game浣跨敤錛屽叿浣撳彲鍙傝冿細(xì)MaNGOS鑴氭湰鎺ュ彛 
銆銆閫氳繃浣跨敤涓嶅悓鐨勮剼鏈珼LL鏉ユ浛鎹hare鐨勮繖涓狣LL,鍙互璁ゞame鍏鋒湁鏇村己鐨凙IScriptDev2 灝辨槸涓涓繖鏍風(fēng)殑搴揝criptDev2 is a replacement for the Script Library that comes with MaNGOS( http://www.getmangos.com ) written in C++ and is compatible with Windows and Linux. It provides scripts for NPCs, Boss events, and Items currently. Once ScriptDev2 is compiled it is automatically run by MaNGOS on server startup. 
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src=

宸ョ▼mangosd 
銆銆mangos鏄笘鐣屾湇鍔″櫒鐨勭鐞嗗櫒錛岃礋璐e垵濮嬪寲宸ヤ綔鍜屽惎鍔ㄤ笘鐣屾湇鍔″櫒鍚勫眰鐨勭嚎紼嬶紝榪欎簺宸ヤ綔涓昏鏄敱綾籑aster鏉ュ疄鐜板叿浣撴槸錛?浣跨敤涓変釜鏁版嵁搴撳璞orldDatabase鍜孋haracterDatabase鍜宭oginDatabase錛屽垵濮嬪寲涓夊ぇ鏁版嵁搴擄細(xì)World Database鍜孋haracter Database鍜宭ogin Database錛屽茍涓烘瘡涓暟鎹簱鐨勮闂兘鍚姩涓涓狣B delay threads鍏蜂綋鐨勬暟鎹簱鎿嶄綔鍔熻兘閮芥槸鐢盡angos鍏叡搴搒hared鏉ユ彁渚?nbsp;
銆銆璋冪敤sWorld.SetInitialWorldSettings錛屽World榪涜鍒濆鍖栵紝鍖呮嫭鍔犺澆鎵鏈夌殑娓告垙鏁版嵁鍜屽垵濮嬪寲鍚勭鏇存柊瀹氭椂鍣ㄥ拰閭歡瀹氭椂鍣紝榪樻湁浜涘叾浠栫殑鍒濆鍖栧伐浣滅被World鐨勬垚鍛樺嚱鏁癝etInitialWorldSettings璋冪敤鎴愬憳鍑芥暟LoadConfigSettings瑙f瀽mangosd.conf錛岃В鏋愬悗鍐呭鏀懼叆uint32 m_configs[CONFIG_VALUE_COUNT]涓?nbsp;
銆銆鍔犺澆鐨勬父鎴忔暟鎹湁錛?nbsp;
銆銆DBC鏁版嵁 
銆銆Objects鏁版嵁 
銆銆Spells鏁版嵁 
銆銆Pooling鏁版嵁 
銆銆Game Event鏁版嵁 
銆銆loot鏁版嵁 
銆銆鎶鑳芥暟鎹?nbsp;
銆銆鎵鏈夊叾浠栫殑娓告垙鏁版嵁錛屽寘鎷琖aypoints鍜孴rainers絳夌瓑絳?nbsp;
銆銆鑴氭湰鏁版嵁 
銆銆鍏朵粬鐨勫垵濮嬪寲宸ヤ綔鏈? 
銆銆鍒濆鍖朚apManager錛屽惎鍔∕ap System 
銆銆鍒濆鍖朆attlegrounds錛屽惎鍔˙attleGround System 
銆銆鍒濆鍖朌ailyQuestResetTime 
銆銆鍒濆鍖杝GameEventMgr錛孲tarting Game Event system 
銆銆綾籑aster鍚姩WorldRunnable錛屽紑濮嬫父鎴忛昏緫Heartbeat for the World錛岀敱Master鍒涘緩錛屽茍璁劇疆綰跨▼涓烘渶楂樹紭鍏堢駭 
銆銆綾籑aster鍚姩CliRunnable錛欳ommand Line Interface handling thread錛岀敱Master鍒涘緩CliRunnable榪愯鏃跺欎細(xì)鐢熸垚涓涓猈orldDatabase綰跨▼錛屽湪鎺ユ敹鍒拌緭鍏ュ悗浼?xì)璋冪敤sWorld.QueueCliCommand鎶奀md鏀懼叆鍒癢orld::cliCmdQueue涓?nbsp;
銆銆mangosd鐨勭嚎紼嬫誨叡鏈夛紙1+3+1+1+1+2 +1 =10錛?0涓嚎紼?涓葷嚎紼婱aster 
銆銆2涓綉緇滅嚎紼婻eactorRunnable錛堝彲閰嶇疆鏁扮洰錛夛紙緗戠粶灞傦級(jí) 
銆銆涓涓猈orld綰跨▼錛堥昏緫灞傦級(jí) 
銆銆涓変釜DB綰跨▼錛堟暟鎹眰錛?nbsp;
銆銆涓涓狢LI綰跨▼錛堣緭鍏ュ眰錛夛紝榪愯鏃跺欎細(xì)鐢熸垚涓涓猈orldDatabase綰跨▼ 
銆銆涓涓猂A綰跨▼錛堢鐞嗗眰錛?nbsp;
銆銆涓涓猣reeze catcher 綰跨▼錛堝彲閫夛級(jí) 
銆銆宸ョ▼g3dlite錛氭父鎴忛昏緫灞傜殑搴曞眰搴?nbsp;
銆銆宸ョ▼framework錛氱郴緇熸鏋?nbsp;
銆銆宸ョ▼realm 
銆銆璐熻矗鐧婚檰鍜岄夋嫨娓告垙鏈嶅姟鍣紝榪涜璐熻澆鍧囪 鐢ㄥ埌浜?jiǎn)C++ Sockets Library榪涜鐧誨綍澶勭悊錛岄噰鐢╯elect I/O妯″瀷瀹炵幇浜?jiǎn)Wow, Mangos鐧誨綍鏃剁殑SRP6璁よ瘉瀹㈡埛绔綔涓哄畠鐨刢lient榪炴帴鍒皉ealm server璁よ瘉鍜岄夋嫨浜?jiǎn)mangos server灝辨柇寮 鑰宮angos server鍜宺ealm server鍒欎笉榪涜榪炴帴錛屽彧鏄氳繃鏁版嵁搴撲氦浜掓暟鎹細(xì)mangos server鎶婅嚜宸辯殑鐘舵佸拰鎷ユ湁鐨勮鑹叉暟鏀懼叆搴撲腑realm server浼?xì)璇诲彇鏁版嵁搴撲腑鐨剺q欎簺淇℃伅鏉ヨ幏鐭angos server鐨勭姸鎬?鏁版嵁搴搑ealm鐨剅ealmlist琛ㄤ繚瀛樹簡(jiǎn)realm鐨勫垪琛?nbsp;
銆銆realm閫氳繃濡備笅浜嬩歡澶勭悊鍑芥暟鏉ヨ礋璐g櫥闄嗗拰閫夋嫨娓告垙鏈嶅姟鍣?nbsp;
銆銆const AuthHandler table[] = 
銆銆{ 
銆銆{ AUTH_LOGON_CHALLENGE, STATUS_CONNECTED, &AuthSocket::_HandleLogonChallenge }, 
銆銆{ AUTH_LOGON_PROOF, STATUS_CONNECTED, &AuthSocket::_HandleLogonProof }, 
銆銆{ AUTH_RECONNECT_CHALLENGE, STATUS_CONNECTED, &AuthSocket::_HandleReconnectChallenge}, 
銆銆{ AUTH_RECONNECT_PROOF, STATUS_CONNECTED, &AuthSocket::_HandleReconnectProof }, 
銆銆{ REALM_LIST, STATUS_AUTHED, &AuthSocket::_HandleRealmList }, 
銆銆{ XFER_ACCEPT, STATUS_CONNECTED, &AuthSocket::_HandleXferAccept }, 
銆銆{ XFER_RESUME, STATUS_CONNECTED, &AuthSocket::_HandleXferResume }, 
銆銆{ XFER_CANCEL, STATUS_CONNECTED, &AuthSocket::_HandleXferCancel } 
銆銆}; 鐧誨綍澶勭悊錛?nbsp;
銆銆user鐧誨綍鍒皉ealm server榪涜韜喚璁よ瘉錛屽茍閫夋嫨鐧誨綍涓婂摢涓猰angos serveruser鐧誨綍鍒癿angos server鍚庯紝灝嗕笉鍐嶅拰realm server浜や簰 
銆銆鍙傝冿細(xì) Wow 鏈嶅姟鍣ㄨВ鏋?nbsp;
銆銆宸ョ▼game 
銆銆game錛氭槸Mangos鐨勬牳蹇?jī)浠g爜锛尵|戠粶灞傚拰閫昏緫灞備唬鐮?閲囩敤浜?jiǎn)ACE鍙嶅簲鍣?Reactor)妯″紡錛?nbsp;
銆銆緗戠粶灞傦細(xì) WorldSocket 錛氳礋璐g綉緇淚O,鑰岀被WorldSession璐熻矗閫昏緫澶勭悊WorldSocket鍜學(xué)orldSession鍒嗗埆鍦ㄧ嫭绔嬬殑綰跨▼ReactorRunnable鍜學(xué)orldRunnable涓繍琛岋紝浣跨敤WorldSession涓殑娑堟伅闃熷垪_recvQueue鏉ヨ繘琛屾暟鎹紦鍐插湪WorldSocket鎺ユ敹鍒扮綉鍜緭鍏ュ悗錛屼細(xì)璋冪敤m_Session->QueuePacket (new_pct);鎶婄綉緇滃寘鏀懼叆WorldSession鐨刜recvQueue鎵浠ワ紝鍙互鐪嬪埌WorldSocket 鏄疢angos game鐨勭綉緇滃眰錛岃學(xué)orldSession鏄昏緫澶勭悊灞俉orldSocketMgr鏄綉緇滃眰鐨勪竴涓鐞嗗櫒錛屽畠璐熻矗鎸囨淳W(wǎng)orldSocket褰掑摢涓猂eactorRunnable綆$悊錛圡angos鍙垱寤哄涓猂eactorRunnable錛岀己鐪佹槸2涓級(jí) 
銆銆WorldSocketMgr錛圡anages all sockets connected to peers and network threads錛夌鐞嗘墍鏈夌殑榪炴帴WorldSocketWorldSocketMgr鐨刉orldSocketMgr::StartNetwork瀵?085錛堢己鐪侊級(jí)绔彛榪涜渚﹀惉閫昏緫澶勭悊鐨勫驚鐜槸鍦╓orld::Update涓驚鐜鐞嗗寘鎷細(xì) 
銆銆鍒鋒柊鏇存柊瀹氭椂鍣?nbsp;
銆銆鍒鋒柊娓告垙瀹氭椂鍣ㄥ拰澶勭悊娓告垙鍏抽棴 
銆銆澶勭悊鏃ュ父浠誨姟 
銆銆澶勭悊鎷嶅崠 
銆銆鍒鋒柊SessionsWorld::UpdateSessions浼?xì)璋冪敤鎵鏈塛orldSession鐨刉orldSession::Update鍦╓orldSession::Update涓繘琛岄昏緫澶勭悊 
銆銆澶勭悊澶╂皵 
銆銆鍒鋒柊uptime table 
銆銆鍒鋒柊Objects錛屽寘鎷琺aps錛宼ransport錛宑reatures錛岋紝錛岋紝 
銆銆鍒鋒柊鎵鏈塺unning battlegrounds 
銆銆鍒鋒柊SqlResultQueue, 閫昏緫灞傚拰鏁版嵁灞傛槸閫氳繃Queue鏉ヨ繘琛屽紓姝ユ搷浣滅殑錛堢敤浜?jiǎn)AsyncPQuery鍜孲qlResultQueue錛?nbsp;
銆銆澶勭悊灝鎬綋縐婚櫎 
銆銆澶勭悊娓告垙浜嬩歡 
銆銆澶勭悊 Move all creatures with "delayed move" and remove and delete all objects with "delayed remove" 
銆銆澶勭悊InstanceSaveManager鐨勫埛鏂?nbsp;
銆銆璋冪敤World::ProcessCliCommands錛屽鐞咰LI浠巆liCmdQueue鍙栧緱cmd榪涜瑙f瀽鎵ц鎵鏈夋湁鏁堢殑Cmd錛岄兘鍙互鍦–hatHandler::getCommandTable涓壘鍒?nbsp;
銆銆綾籛orldSession錛?綾籛orldSession璐熻矗閫昏緫澶勭悊 
銆銆void WorldSession::SendPacket(WorldPacket const* packet) 璐熻矗鍙戝寘緇欏鎴風(fēng)錛岀洿鎺ュ彂鍖咃紝娌℃湁杈撳嚭緙撳啿闃熷垪 
銆銆鍦╓orldSession::Update涓繘琛岄昏緫澶勭悊World::UpdateSessions浼?xì)璋冪敤鎵鏈塛orldSession鐨刉orldSession::Update 
銆銆鎵ц璇彞OpcodeHandler& opHandle = opcodeTable[packet->GetOpcode()];寰楀埌opHandle 
銆銆鏍規(guī)嵁寰楀埌鐨刼pHandle錛屾墽琛?this->*opHandle.handler)(*packet); 
銆銆WorldSession::HandlePlayerLogin澶勭悊鐜╁鐧婚檰娓告垙 
銆銆鏋勫緩Player 
銆銆Player::LoadFromDB浠庢暟鎹簱涓姞杞界帺瀹舵暟鎹湪Player::LoadFromDB涓細(xì)璋冪敤SetMap(MapManager::Instance().CreateMap(GetMapId() , this));鍔犺澆褰撳墠player鎵鍦ㄧ殑map 
銆銆Player::SetPosition鍦≒layer榪愬姩鐨勬椂鍊欙紝鏀瑰彉浣嶇疆錛屼繚瀛樺鐞嗗じ鍖?nbsp;
銆銆綾籑ap瀹炵幇浜?jiǎn)涓涓猻tate machine錛岄噰鐢╯tate pattern緇勭粐浜?jiǎn)Gid鐨?涓猻tate object錛欼nvalidState錛汚ctiveState錛汭dleState錛汻emovalState 
銆銆game涓殑綆$悊鍣ㄦ湁錛?ObjectMgr 
銆銆mMangosStringLocaleMap 鍏寵仈鍒癿angos_string table 
銆銆m_scriptNames 鍏寵仈鍒皌ables: creature_template;gameobject_template;item_templat e;areatrigger_scripts;instance_template 
銆銆mCreatureLocaleMap 鍏寵仈鍒發(fā)ocales_creature table 
銆銆mGameObjectLocaleMap鍏寵仈鍒發(fā)ocales_gameobject table 
銆銆mItemLocaleMap鍏寵仈鍒發(fā)ocales_item table 
銆銆mQuestLocaleMap –> locales_quest 
銆銆mNpcTextLocaleMap –> locales_npc_text 
銆銆mPageTextLocaleMap –> locales_page_text 
銆銆mGossipMenuItemsLocaleMap –> locales_gossip_menu_option 
銆銆mPointOfInterestLocaleMap –> locales_points_of_interest 
銆銆… 
銆銆瀵硅薄綾誨眰嬈?nbsp;
銆銆瀵硅薄鐨勭被灞傛濡備笅錛屾墍鏈夌殑Object閮界敱O(jiān)bjectMgr榪涜綆$悊ObjectMgr浠UID鏂瑰紡錛岀鐞嗕簡(jiǎn)characters錛宑reature錛宨tem_instance錛実ameobject錛宎uctionhouse錛宮ail錛宨tem_text錛宑orpse錛宎rena_team錛宑haracter_equipmentsets 
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src=
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src=
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src=
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src=
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src=

Player鐘舵?nbsp;
銆銆/// Player state 
銆銆enum SessionStatus 
銆銆{ 
銆銆STATUS_AUTHED = 0, ///< Player authenticated (_player==NULL, m_playerRecentlyLogout = false or will be reset before handler call, m_GUID have garbage) 
銆銆STATUS_LOGGEDIN, ///< Player in game (_player!=NULL, m_GUID == _player->GetGUID(), inWorld()) 
銆銆STATUS_TRANSFER, ///< Player transferring to another map (_player!=NULL, m_GUID == _player->GetGUID(), !inWorld()) 
銆銆STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT, ///< _player!= NULL or _player==NULL && m_playerRecentlyLogout, m_GUID store last _player guid) 
銆銆STATUS_NEVER ///< Opcode not accepted from client (deprecated or server side only) 
銆銆}; 
銆銆鐢熺墿鐘舵?nbsp;
銆銆enum DeathState 
銆銆{ 
銆銆ALIVE = 0, 
銆銆JUST_DIED = 1, 
銆銆CORPSE = 2, 
銆銆DEAD = 3, 
銆銆JUST_ALIVED = 4, 
銆銆DEAD_FALLING= 5 
銆銆}; 
銆銆鐜╁鐧婚檰 
銆銆鏈嶅姟鍣ㄧ鍦ㄨ繛鎺ユ墦寮鍚庯紝浼?xì)鍙慡MSG_AUTH_CHALLENGE鍒板鎴風(fēng)瀹㈡埛绔粠鏈嶅姟鍣ㄧ鍙戦佸洖鏉ョ殑縐嶅瓙鍜?SRP6 鏁版嵁涓駭鐢熼殢鏈虹瀛愶紝鐢熸垚 SHA1 瀛楃涓詫紝鐢ㄨ繖浜涙暟鎹敓鎴?CMSG_AUITH_SESSION 鏁版嵁鍖咃紝鍙戦佺粰鏈嶅姟绔繖涓繃紼嬫槸娌℃湁緇忚繃鍔犲瘑鐨?nbsp;
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src=
銆銆瀹㈡埛绔彂閫丼MSG_AUTH_SESSION鍒版湇鍔″櫒 
銆銆鏈嶅姟鍣ㄥ鐞哠MSG_AUTH_SESSION 
銆銆鏈嶅姟鍣ㄥ彂閫丼MSG_AUTH_RESPONSE緇欏鎴風(fēng) 
銆銆鏈嶅姟鍣ㄥ彂閫丼MSG_ADDON_INFO緇欏鎴風(fēng) 
銆銆鏈嶅姟鍣ㄥ彂閫丼MSG_CLIENTCACHE_VERSION緇欏鎴風(fēng) 
銆銆鏈嶅姟鍣ㄥ彂閫丼MSG_TUTORIAL_FLAGS緇欏鎴風(fēng) 
銆銆packet緇撴瀯 SMSG_AUTH_SESSION 鏄痗lient packet鏈変竴涓ご閮紙ClientPktHeader錛夛紝鍚庨潰鏄暟鎹潡 
銆銆SMSG_AUTH_RESPONSE 鏄痵erver packet鏈変竴涓ご閮紙ServicePktHeader錛夛紝鍚庨潰鏄暟鎹潡 
銆銆SMSG_AUTH_RESPONSE 鐨勫寘緇勭粐 
銆銆SMSG_AUTH_RESPONSE 鐨刼pcode鏄?1EE錛孊yteBuffer澶у皬涓? + 4 + 1 + 4 + 1=11涓涓猄MSG_AUTH_RESPONSE 鐨勬暟鎹涓嬶細(xì) 鍦ㄦ瀯閫犱簡(jiǎn)SMSG_AUTH_RESPONSE packet鍚庯紝W(xué)orldSocket::SendPacket浼?xì)鏍规嵁SMSG_AUTH_RESPONSE packet鏋勯犲嚭涓涓猄erverPktHeader錛屽茍瀵筍erverPktHeader涓殑鏁版嵁header榪涜鍔犲瘑鍙戦佸姞瀵嗛噰鐢╩_Crypt.EncryptSend ((uint8*)header.header, header.getHeaderLength()); WorldSocket::handle_input_header浼?xì)瀵逛粠瀹㈡堬L(fēng)鎺ユ敹鏉ョ殑鏁版嵁榪涜瑙e瘑錛岃В瀵嗛噰鐢╩_Crypt.DecryptRecv ((uint8*) m_Header.rd_ptr (), sizeof (ClientPktHeader)); 
銆銆瑙掕壊鏋氫婦 鐜╁鐧諱笂鏈嶅姟鍣ㄥ悗錛屼粠瀹㈡埛绔彂閫丼MSG_CHAR_ENUM鍒版湇鍔″櫒 
銆銆鍦ㄦ湇鍔″櫒绔?nbsp;
銆銆鏍規(guī)嵁{ "CMSG_CHAR_ENUM", STATUS_AUTHED, &WorldSession::HandleCharEnumOpcode }錛屾湇鍔″櫒浼?xì)璋冪敤WorldSession::HandleCharEnumOpcode 
銆銆WorldSession::HandleCharEnumOpcode浼?xì)璋冪敤CharacterDatabase.AsyncPQuery錛岃繘琛屽紓姝ユ煡璇㈠悗錛岃皟鐢–haracterHandler::HandleCharEnumCallback 
銆銆CharacterHandler::HandleCharEnumCallback浼?xì)鍥炲ご璋冪敤session->HandleCharEnum(result); 
銆銆WorldSession::HandleCharEnum鏍規(guī)嵁characters鏁版嵁搴撶殑鏌ヨ緇撴灉錛岃皟鐢≒layer::BuildEnumData錛屽姞杞借鑹叉暟鎹紝鏋勯燬MSG_CHAR_ENUM榪斿洖鍖咃紝鐒跺悗鍙戦佸洖瀹㈡埛绔?nbsp;
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src=
銆銆瑙掕壊鍒涘緩 
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src= 
銆銆瑙掕壊鐨勫垵濮嬪寲瑁呭鍦–harStartOutfit.dbc 
銆銆瑙掕壊鐨勫垱寤哄拰閫夋嫨鐨勮緗兘鍦?ChrRaces.dbc 
銆銆瑙掕壊鐨勫垱寤哄睘鎬ч兘鍦≒layercreateinfo錛屽寘鎷嚭鐢熷湴鍜屽嚭鐢熷睘鎬?nbsp;
銆銆playercreateinfo_item琛ㄦ槸鍒涘緩涓涓柊浜虹墿鏃訛紝浜虹墿榛樿甯︾殑鎵鏈塈tem鐨勮〃 
銆銆playercreateinfo_spell琛ㄦ槸鍒涘緩涓涓柊浜虹墿鏃訛紝浜虹墿榛樿甯︾殑鎵鏈塖pell鐨勮〃 
瑙掕壊鍒犻櫎 
銆銆Mangos浠g爜闃呰 - 闄堟嘗 - cp7618@yeah鐨勫崥瀹? src=



]]>
(鎼敤宸?mangos鏂版墜鏁欑▼ - 鏈嶅姟鍣ㄩ厤緗枃浠朵腑鏂囪鏄?/title><link>http://www.shnenglu.com/ming81/archive/2016/12/16/214497.html</link><dc:creator>鐐圭偣婊存淮</dc:creator><author>鐐圭偣婊存淮</author><pubDate>Fri, 16 Dec 2016 03:16:00 GMT</pubDate><guid>http://www.shnenglu.com/ming81/archive/2016/12/16/214497.html</guid><description><![CDATA[<div style="box-sizing: border-box; word-break: break-all; color: #333333; font-family: sans-serif; font-size: 24px; background-color: #ffffff;"></div><table border="0" style="box-sizing: border-box; border-collapse: collapse; border-spacing: 0px; max-width: 100%; background-color: #ffffff; word-break: break-all; border-width: 0.05rem; border-style: solid; border-color: #eeeeee; color: #333333; font-family: sans-serif; font-size: 24px; table-layout: fixed;"><tbody style="box-sizing: border-box;"><tr style="box-sizing: border-box;"><td style="box-sizing: border-box; border-width: 0.05rem; border-style: solid; border-color: #eeeeee;"><div class="hvzpftn" id="blog_text" style="box-sizing: border-box; word-break: break-all;"><div style="box-sizing: border-box; word-break: break-all;"># MaNGOS Configuration file 鏈嶅姟鍣ㄩ厤緗枃浠朵腑鏂囪鏄?br style="box-sizing: border-box;" />ConfVersion=2007071001<br style="box-sizing: border-box;" /># RealmID must match the realmlist (鍥藉害ID 蹇呯墥鍑?鏀樻枩鐮濋敥濞村崡鍠?<br style="box-sizing: border-box;" />RealmID = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 0 NORMAL 1 PVP 4 NORMAL 6 RP 8 RPPVP(鏈嶅姟鍣ㄧ被鍨?<br style="box-sizing: border-box;" />GameType = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鎵╁睍鏌氭瘡 ?# 0 涓嶆鏌ユ墿灞曞湴鍥?涓嶅厑璁稿垱寤烘柊縐嶆棌,蹇界暐璐﹀彿鐨勬墿灞曡緗?<br style="box-sizing: border-box;" /># 榛樿: 1 (濡傛灉瀹㈡埛绔敮鎸佹墿灞曚笖璐﹀彿鎷ユ湁鎵╁睍鏉冮檺,鍗沖厑璁鎬嬌鐢ㄦ柊縐嶆棌鍙?qiáng)璁块棶鏂板湴鍥?)<br style="box-sizing: border-box;" />Expansion = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#==================================鏈嶅姟绔坊鍔犵殑鍙傛暟===========================================================================<br style="box-sizing: border-box;" />#涓栫晫鑱婂ぉ娑堣垂(榛樿鏄?G/嬈?<br style="box-sizing: border-box;" />sjxf=10000<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#鍒濆浜虹墿閲戝竵錛屼互鍒嗕負(fù)鍗曚綅.<br style="box-sizing: border-box;" /># 榛樿: 8<br style="box-sizing: border-box;" />mymoney = 1000000<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鑷姩鍏憡鏃墮棿闂撮殧 1=1縐?br style="box-sizing: border-box;" />AutoBroadcastInterval=10 <br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#鍒濆鎬墿灝鎬綋鍋滅暀鏃墮棿<br style="box-sizing: border-box;" />#鍗曚綅/縐?nbsp;<br style="box-sizing: border-box;" /># 榛樿: 60<br style="box-sizing: border-box;" />MyCropseDelay = 60<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#浜虹墿澶嶆椿铏氬急鏃墮棿<br style="box-sizing: border-box;" />#榛樿: 1000<br style="box-sizing: border-box;" />Playerdietime = 1000<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#鍒濆鍑虹敓浜虹墿絳夌駭<br style="box-sizing: border-box;" /># 榛樿: 1<br style="box-sizing: border-box;" />LevelFirst = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#鍔犺鎶鑳芥不鐤楀嶆暟<br style="box-sizing: border-box;" />aurahealing = 5<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#娉曟湳鎶鑳戒激瀹沖嶆暟<br style="box-sizing: border-box;" />tmpDamage = 5<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#鐗╃悊鎶鑳戒激瀹沖嶆暟(鏁板瓧鍒敼鐨勫お澶т簡(jiǎn))<br style="box-sizing: border-box;" />pdaDamage = 2<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#鐚庝漢闂伩鐜囪緗?鏁板瓧瓚婂ぇ闂伩鐜囪秺浣?<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />Rate.Hunter_Max.Dodge=31.4<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#鐩楄醇闂伩鐜囪緗?鏁板瓧瓚婂ぇ闂伩鐜囪秺浣?<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />Rate.Roguer_Max.Dodge=19.5<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#鍏朵粬鑱屼笟闂伩鐜囪緗?鏁板瓧瓚婂ぇ闂伩鐜囪秺浣?<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />Rate.Else_Max.Dodge=27<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#==================================鏈嶅姟绔坊鍔犵殑鍙傛暟===========================================================================<br style="box-sizing: border-box;" /># 鏁版嵁鐩綍璁劇疆銆?br style="box-sizing: border-box;" /># 閲嶈璇存槑錛氭暟鎹洰褰曢渶瑕佹斁鍦ㄥ紩鍙烽噷闈紝鍥犱負(fù)瀛楃涓插彲鑳藉寘鍚┖鏍?br style="box-sizing: border-box;" /># DataDir = "@MANGOSD_DATA@" //榪欎釜鏄粯璁ょ洰褰?br style="box-sizing: border-box;" />DataDir = "./"<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># Logs directory setting.<br style="box-sizing: border-box;" /># Important: Logs dir must exists, or all logs be disable<br style="box-sizing: border-box;" /># Default: "" - no log directory prefix, if used log names isn't absolute path then logs will be stored in current directory for run program.<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />LogsDir = ""<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 涓栫晫鏈嶅姟鍣ㄧ殑鏁版嵁搴撹繛鎺ヨ緗?br style="box-sizing: border-box;" /># 鏍煎紡錛氫富鏈哄湴鍧(鍩熷悕鎴朓P錛?绔彛;鐢ㄦ埛鍚?瀵嗙爜;鏁版嵁搴撳悕縐?br style="box-sizing: border-box;" />#           .;somenumber;username;password;database - use named pipes at Windows<br style="box-sizing: border-box;" />#                 Named pipes: mySQL required adding "enable-named-pipe" to [mysqld] section my.ini<br style="box-sizing: border-box;" />#           .;/path/to/unix_socket;username;password;database - use Unix sockets at Unix/Linux<br style="box-sizing: border-box;" />#                 Unix sockets: experimental, not tested<br style="box-sizing: border-box;" />LoginDatabaseInfo = "127.0.0.1;3306;root;netspace;realmd"<br style="box-sizing: border-box;" />WorldDatabaseInfo = "127.0.0.1;3306;root;netspace;mangos"<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 璁劇疆鏈楂榩ing鏁版嵁搴撶殑鏃墮棿闂撮殧(鍒嗛挓)<br style="box-sizing: border-box;" />MaxPingTime = 30<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># DBC 璇█璁劇疆<br style="box-sizing: border-box;" />#8 鑻辮<br style="box-sizing: border-box;" />#4 闊╄<br style="box-sizing: border-box;" />#3 娉曡<br style="box-sizing: border-box;" />#3 寰瘋<br style="box-sizing: border-box;" />#4 涓枃<br style="box-sizing: border-box;" />#5 鍙版咕綣佷綋<br style="box-sizing: border-box;" />#6 瑗跨彮鐗欒<br style="box-sizing: border-box;" />#7 淇勮<br style="box-sizing: border-box;" />#8 鏈煡 <br style="box-sizing: border-box;" /># 8 = Unknown<br style="box-sizing: border-box;" /># 9 = Unknown<br style="box-sizing: border-box;" /># 10 = Unknown<br style="box-sizing: border-box;" /># 11 = Unknown<br style="box-sizing: border-box;" /># 12 = Unknown<br style="box-sizing: border-box;" /># 13 = Unknown<br style="box-sizing: border-box;" /># 14 = Unknown<br style="box-sizing: border-box;" /># 15 = Unknown<br style="box-sizing: border-box;" /># 255 = 鑷姩媯(gè)嫻?(榛樿)<br style="box-sizing: border-box;" />DBC.Locale = 255<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鍚敤GM鍛戒護(hù)璁板綍-鎵鏈夌殑SQL浠g爜閮藉皢琚褰曞湪鏃ヨ鏂囦歡涓?br style="box-sizing: border-box;" /># All commands are written to a file: YYYY-MM-DD_logSQL.sql<br style="box-sizing: border-box;" /># If a new day starts (00:00:00) then a new file is created - the old<br style="box-sizing: border-box;" /># file will not be deleted.<br style="box-sizing: border-box;" /># 0 - 涓嶈褰?br style="box-sizing: border-box;" /># 1 - 璁板綍<br style="box-sizing: border-box;" />LogSQL = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏈嶅姟鍣ㄦ帶鍒跺彴璁板綍鏄劇ず鐨勭駭鍒?br style="box-sizing: border-box;" /># 0 = 鏈灝? 1 = 鍩虹鍜岄敊璇? 2 = 璇︾粏; 3 = 瀹屽叏鎴栦睛閿?br style="box-sizing: border-box;" /># 榛樿: 0<br style="box-sizing: border-box;" /># 鎺ㄨ崘: 1<br style="box-sizing: border-box;" />LogLevel = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 璁板綍鏂囦歡 鐨勫悕瀛?br style="box-sizing: border-box;" /># 鏂囦歡鍚嶄負(fù)絀?鍒欎笉鍒涘緩璁板綍鏂囦歡,濡? LogFile = <br style="box-sizing: border-box;" /># 榛樿: ""<br style="box-sizing: border-box;" />LogFile = "Server.log"<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># Logfile with timestamp of server start in name<br style="box-sizing: border-box;" /># Default: 0 - no timestamp in name<br style="box-sizing: border-box;" />#           1 - add timestamp in name in form Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />LogTimestamp = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 璁板綍鏂囦歡鐨勮褰曠駭鍒?br style="box-sizing: border-box;" /># 0 = 鏈灝? 1 = 鍩虹鍜岄敊璇? 2 = 璇︾粏; 3 = 瀹屽叏鎴栦睛閿?br style="box-sizing: border-box;" /># 榛樿: 0<br style="box-sizing: border-box;" />LogFileLevel = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># Log filters<br style="box-sizing: border-box;" /># 0 (default) - include in log if log level permit, 1 - not include with any log level<br style="box-sizing: border-box;" />LogFilter_TransportMoves = 0<br style="box-sizing: border-box;" />LogFilter_CreatureMoves = 0<br style="box-sizing: border-box;" />LogFilter_VisibilityChanges = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鎺у埗鍙頒俊鎭殑棰滆壊 (鏍煎紡: "姝e父棰滆壊 璇︽儏棰滆壊 debug棰滆壊 閿欒棰滆壊)<br style="box-sizing: border-box;" /># 棰滆壊: 0-榛戣壊, 1-綰? 2-緇? 3-媯? 4-钃? 5-鍝佺孩, 6-闈掔豢, 7-鐏拌壊, <br style="box-sizing: border-box;" /># 8-榛? 9-娣$孩, 10-娣$豢, 11-娣¤摑, 12-娣″搧綰? 13-娣¢潚緇? 14-鐧借壊<br style="box-sizing: border-box;" /># 榛樿: "" 鏃犻鑹?鐧借壊)<br style="box-sizing: border-box;" /># 渚嬪: "13 7 11 9" <br style="box-sizing: border-box;" />LogColors = "13 7 11 9"<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># Packet logging file for the worldserver.<br style="box-sizing: border-box;" /># Default: ""<br style="box-sizing: border-box;" />WorldLogFile = "world.log"<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 璁板綍鏁版嵁搴撻敊璇殑鏂囦歡鍚?br style="box-sizing: border-box;" /># 榛樿: ""<br style="box-sizing: border-box;" />DBErrorLogFile = "DBErrors.log"<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 璁板綍GM鍛戒護(hù)浣跨敤鎯呭喌鐨?璁板綍鏂囦歡鍚?br style="box-sizing: border-box;" /># 榛樿: "" (紱佹) 鍏佽鏃?渚嬪: "GMcommand.log"<br style="box-sizing: border-box;" />GmLogFile = ""<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># Log file of RA commands, "" for disable<br style="box-sizing: border-box;" /># Default: "Ra.log"<br style="box-sizing: border-box;" />RaLogFile = ""<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鍦ㄥ綰跨▼緋葷粺 浣跨敤綰跨▼MASK(鍙湪Windows緋葷粺涓嬩嬌鐢?<br style="box-sizing: border-box;" /># 榛樿: 0 (鎿嶄綔緋葷粺鏉ラ夋嫨)<br style="box-sizing: border-box;" /># 涓句緥: 鏁板瓧<br style="box-sizing: border-box;" />UseProcessors = 80<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 榪涚▼浼樺厛鏉冭緗?鍙湪Windows緋葷粺涓嬩嬌鐢?<br style="box-sizing: border-box;" /># 0 (姝e父浼樺厛鏉?<br style="box-sizing: border-box;" /># 榛樿: 1 (楂樹紭鍏?<br style="box-sizing: border-box;" />ProcessPriority = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#鍙戦佸埌瀹㈡埛绔殑鏇存柊鏁版嵁鍖呯殑鍘嬬緝綰у埆(1鍒?)<br style="box-sizing: border-box;" /># 榛樿: 1 (閫熷害蹇?涓嶅帇緙? <br style="box-sizing: border-box;" /># 9 (鏈濂界殑鍘嬬緝) <br style="box-sizing: border-box;" />Compression = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 闄M涔嬪 娓告垙鏈澶у湪綰跨帺瀹舵暟闄愬埗<br style="box-sizing: border-box;" /># 榛樿: 100<br style="box-sizing: border-box;" />PlayerLimit = 100<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鐜╁鑾峰緱緇忛獙鑳藉崌鍒扮殑鏈楂樼瓑綰?蹇呴』鍦?1 鍒?255).<br style="box-sizing: border-box;" /># 涓嶅緩璁慨鏀?寤鴻鐢ㄩ粯璁ょ殑 60 瓚呰繃60 鍙兘褰卞搷娓告垙騫寵 <br style="box-sizing: border-box;" /># 榛樿: 60<br style="box-sizing: border-box;" />MaxPlayerLevel = 70<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 澶╂皵緋葷粺寮鍏?br style="box-sizing: border-box;" /># 榛樿: 1 (寮)<br style="box-sizing: border-box;" />#           0 (鍏?<br style="box-sizing: border-box;" />ActivateWeather = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏄惁蹇界暐榪涘叆鍓湰鐨勭瓑綰ч渶瑕?br style="box-sizing: border-box;" />#       1 (true)<br style="box-sizing: border-box;" /># 榛樿: 0 (鍚?<br style="box-sizing: border-box;" />IgnoreATLevelRequirement = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鐜╁鏈澶氬彲浠ュ鐨?鍟嗕笟鎶鑳?br style="box-sizing: border-box;" /># 榛樿: 2<br style="box-sizing: border-box;" /># 鏈澶? 9<br style="box-sizing: border-box;" />MaxPrimaryTradeSkill = 2 <br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 寤虹珛鍏細(xì)鎵闇鐨勬渶灝戠帺瀹剁鍚嶄釜鏁?(0..9).<br style="box-sizing: border-box;" /># 榛樿: 9<br style="box-sizing: border-box;" />MinPetitionSigns = 9<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 灝忛槦鎴愬憳鍦ㄧ敓鐗╂浜?鑾峰緱緇忛獙鐨?鏈澶ц窛紱?鍚屾墿鐨勮窛紱?<br style="box-sizing: border-box;" /># 榛樿: 74<br style="box-sizing: border-box;" />MaxGroupXPDistance = 74<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 灝忛槦鎴愬憳鍦ㄧ敓鐗╂浜?鑾峰緱緇忛獙鐨?鏈澶х瓑綰у樊(鍚屾墿鐨勭瓑綰?<br style="box-sizing: border-box;" /># 榛樿: 10<br style="box-sizing: border-box;" />MaxGroupXPLevelDiff = 10<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏄惁榪愯鍚?涓笎鍙?寤虹珛涓?涓笉鍚岄樀钀ョ殑瑙掕壊 GM鍙蜂負(fù)濮嬬粓涓?鍏佽<br style="box-sizing: border-box;" /># 榛樿: 0 (涓嶅厑璁?<br style="box-sizing: border-box;" /># 1 (鍏佽)<br style="box-sizing: border-box;" />AllowTwoSide.Accounts = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏄惁鍏佽 涓嶅悓闃佃惀闂寸殑 鑱婂ぉ 棰戦亾鑱婂ぉ 緇勯槦 浜ゆ槗<br style="box-sizing: border-box;" /># 榛樿: 0 (涓嶅厑璁?<br style="box-sizing: border-box;" />#     1 (鍏佽)<br style="box-sizing: border-box;" />AllowTwoSide.Interaction.Chat = 0<br style="box-sizing: border-box;" />AllowTwoSide.Interaction.Channel = 0<br style="box-sizing: border-box;" />AllowTwoSide.Interaction.Group = 0<br style="box-sizing: border-box;" />AllowTwoSide.Interaction.Guild = 0<br style="box-sizing: border-box;" />AllowTwoSide.Interaction.Trade = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏄惁鍦?鍦ㄧ嚎鐜╁鍒楄〃 閲屾樉紺烘晫瀵歸樀钀ョ帺瀹?br style="box-sizing: border-box;" /># 榛樿: 0 (涓嶅厑璁?<br style="box-sizing: border-box;" /># 1 (鍏佽)<br style="box-sizing: border-box;" />AllowTwoSide.WhoList = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 闃插埛灞忓紑鍏?澶氬皯鏉¤繚瑙勪俊鎭縺媧諱繚鎶?br style="box-sizing: border-box;" />#           0 (涓哄叧闂槻鍒峰睆)<br style="box-sizing: border-box;" /># 榛樿: 10<br style="box-sizing: border-box;" />ChatFlood.MessageCount = 10<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 闃插埛灞忓紑鍏?澶氬皯縐掗棿闅斿紑濮嬭綆椾負(fù)榪濊淇℃伅<br style="box-sizing: border-box;" /># 榛樿: 1 (縐?<br style="box-sizing: border-box;" />ChatFlood.MessageDelay = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 闃插埛灞忓紑鍏?紱佽█鏃墮棿.<br style="box-sizing: border-box;" /># 榛樿: 10 (縐?<br style="box-sizing: border-box;" />ChatFlood.MuteTime = 10<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># GM榛樿鏄惁鎺ュ彈鐜╁鐨勬?zhèn)勬?zhèn)勮瘽.<br style="box-sizing: border-box;" /># 榛樿: 0 (false)<br style="box-sizing: border-box;" />#     1 (true) <br style="box-sizing: border-box;" />GM.WhisperingTo = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 褰揋M璁劇疆涓哄彲瑙佹椂 鏄惁鍦ㄧ帺瀹跺垪琛ㄦ樉紺篏M.<br style="box-sizing: border-box;" /># 榛樿: 0 (false)<br style="box-sizing: border-box;" />#     1 (true) <br style="box-sizing: border-box;" />GM.InGMList = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏄惁鏄劇ずGM鍚嶅崟 (if visible).<br style="box-sizing: border-box;" /># 榛樿: 0 (false)<br style="box-sizing: border-box;" />#           1 (true) <br style="box-sizing: border-box;" />GM.InWhoList = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># GM妯″紡鍦ㄧ櫥闄嗘椂鐘舵?br style="box-sizing: border-box;" />#           0 (鎬繪槸鍏?<br style="box-sizing: border-box;" />#           1 (鎬繪槸寮) <br style="box-sizing: border-box;" /># 榛樿: 2 (涓婃紱誨紑鏃剁姸鎬?<br style="box-sizing: border-box;" />GM.LoginState = 2<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 濡傛灉鎵撳紑 鍒欏湪GM LOG閲岃褰旼M鐨勪氦鏄撳拰浜ゆ槗淇℃伅<br style="box-sizing: border-box;" />#           0 (涓嶈褰?<br style="box-sizing: border-box;" /># 榛樿: 1 (璁板綍)<br style="box-sizing: border-box;" />GM.LogTrade = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鍥㈤槦鍙妯″紡<br style="box-sizing: border-box;" /># 榛樿: 0-鏍囧噯璁劇疆錛氬彧鏈夊悓涓涓洟闃熺殑闃熷弸鎵嶅彲浠?00%渚︽祴闅愬艦鐜╁<br style="box-sizing: border-box;" />#    1-鍙湁鍚屼竴涓皬闃熺殑闃熷弸鎵嶅彲浠?00%渚︽祴闅愬艦鐜╁<br style="box-sizing: border-box;" />#    2-鍚屼竴闃佃惀鐨勯槦鍙嬪彲浠?00%渚︽祴闅愬艦鐜╁<br style="box-sizing: border-box;" />Visibility.GroupMode = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 涓嶅悓鐨勬父鎴忕墿浣撲箣闂寸殑鍙搴?nbsp;<br style="box-sizing: border-box;" /># 鏈澶ц緗? ~ 166<br style="box-sizing: border-box;" /># 鏈灝忚緗互鐗╀綋涓哄噯<br style="box-sizing: border-box;" /># 榛樿: 66 (鍗曞厓)<br style="box-sizing: border-box;" />#<br style="box-sizing: border-box;" /># Min limit is max aggro radius (45) * Rate.Creature.Aggro<br style="box-sizing: border-box;" />Visibility.Distance.Creature    = 66<br style="box-sizing: border-box;" />Visibility.Distance.Player       = 66<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># gameobject, dynobject, bodies, corpses, bones<br style="box-sizing: border-box;" /># Min limit is iteraction distance (5)<br style="box-sizing: border-box;" />Visibility.Distance.Object       = 66<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># visible distance for player in flight<br style="box-sizing: border-box;" /># Min limit is 0 (not show any objects)<br style="box-sizing: border-box;" />Visibility.Distance.InFlight    = 66<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># Visibility grey distance for creatures/players (fast changing obects)<br style="box-sizing: border-box;" />#     addition to appropriate object type Visibility.Distance.* use in case visibility removing to object (except corpse around distences)<br style="box-sizing: border-box;" />#     If ?is distance and G is grey distance then object make visible if distance to it <= D but make non visible if distance > D+G<br style="box-sizing: border-box;" /># Default: 1 yard<br style="box-sizing: border-box;" />Visibility.Distance.Grey.Unit = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># Visibility grey distance for dynobjects/gameobjects/corpses/creature bodies<br style="box-sizing: border-box;" /># <br style="box-sizing: border-box;" /># Default: 10 yards<br style="box-sizing: border-box;" />Visibility.Distance.Grey.Object = 10<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 濡傛灉閭瘎鐗╁搧寤舵椂澶氫箙鏀跺埌錛燂紵<br style="box-sizing: border-box;" /># 榛樿: 3600 縐?(1 hour)<br style="box-sizing: border-box;" />MailDeliveryDelay = 3600<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 姣忔棩娑堟伅銆傚綋鐜╁榪涘叆娓告垙鐨勬椂鍊欐樉紺哄湪鑱婂ぉ紿楀彛鐨勪俊鎭?br style="box-sizing: border-box;" />Motd = "Welcome to the Massive Network Game Object Server."<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># Health and power regeneration and rage income from damage.<br style="box-sizing: border-box;" />Rate.Health = 1;<br style="box-sizing: border-box;" />Rate.Mana = 1;<br style="box-sizing: border-box;" />Rate.Rage.Income = 1;<br style="box-sizing: border-box;" />Rate.Rage.Loss = 1;<br style="box-sizing: border-box;" />Rate.Focus = 1;<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鐗╁搧鐨勬帀鐜囧嶆暟<br style="box-sizing: border-box;" />#poor,鐧借壊錛?br style="box-sizing: border-box;" />#common,鏅氾紱<br style="box-sizing: border-box;" />#uncommon,緗曡鐨?<br style="box-sizing: border-box;" />#rare,璐甸噸鐨勶紱<br style="box-sizing: border-box;" />#Epic,鍙茶瘲;<br style="box-sizing: border-box;" />#Legendary,浼犺;<br style="box-sizing: border-box;" />#uest,浠誨姟> <br style="box-sizing: border-box;" /># 榛樿: 1<br style="box-sizing: border-box;" /># Rate.Drop.Items = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />Rate.Drop.Items.Quality.Poor = 1<br style="box-sizing: border-box;" />Rate.Drop.Items.Quality.Common = 1<br style="box-sizing: border-box;" />Rate.Drop.Items.Quality.Uncommon = 1<br style="box-sizing: border-box;" />Rate.Drop.Items.Quality.Rare = 1<br style="box-sizing: border-box;" />Rate.Drop.Items.Quality.Epic = 1<br style="box-sizing: border-box;" />Rate.Drop.Items.Quality.Legendary = 1<br style="box-sizing: border-box;" />Rate.Drop.Items.Quest = 1<br style="box-sizing: border-box;" />Rate.Drop.Money = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏉鎬?浠誨姟,鎺㈢儲(chǔ)鍦板浘 鑾峰緱緇忛獙 涔樹互鐨勫嶆暟<br style="box-sizing: border-box;" /># 榛樿: 1<br style="box-sizing: border-box;" />Rate.XP.Kill     = 20<br style="box-sizing: border-box;" />Rate.XP.Quest = 30<br style="box-sizing: border-box;" />Rate.XP.Explore = 10<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏅?綺捐嫳,紼鏈夌簿鑻?BOSS,紼鏈夋櫘閫氭?鐨勪激瀹?涔樹互鐨勫嶆暟<br style="box-sizing: border-box;" /># 渚嬪: 1.4 灝辨槸 澧炲姞0.4鍊嶆敾鍑諱激瀹?br style="box-sizing: border-box;" />Rate.Creature.Normal.Damage = 1<br style="box-sizing: border-box;" />Rate.Creature.Elite.Elite.Damage = 1<br style="box-sizing: border-box;" />Rate.Creature.Elite.RAREELITE.Damage = 1<br style="box-sizing: border-box;" />Rate.Creature.Elite.WORLDBOSS.Damage = 1<br style="box-sizing: border-box;" />Rate.Creature.Elite.RARE.Damage = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏅?綺捐嫳,紼鏈夌簿鑻?BOSS,紼鏈夋櫘閫氭?鐨勮閲?涔樹互鐨勫嶆暟<br style="box-sizing: border-box;" /># 渚嬪: 1.4 灝辨槸 澧炲姞0.4鍊嶆敾鍑昏閲?br style="box-sizing: border-box;" />Rate.Creature.Normal.HP = 1<br style="box-sizing: border-box;" />Rate.Creature.Elite.Elite.HP = 1<br style="box-sizing: border-box;" />Rate.Creature.Elite.RAREELITE.HP = 1<br style="box-sizing: border-box;" />Rate.Creature.Elite.WORLDBOSS.HP = 1<br style="box-sizing: border-box;" />Rate.Creature.Elite.RARE.HP = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" />#浠囨仺緋繪暟錛岄粯璁?.1f錛屽嵆鏈夎秴榪囩涓浠囨仺鑰呴犳垚浼ゅ110%鑰呭氨杞彉鏀誨嚮瀵硅薄銆?br style="box-sizing: border-box;" />#娉ㄦ剰錛佸繀欏葷簿紜埌灝忔暟鐐瑰悗1浣?br style="box-sizing: border-box;" /># 榛樿: 1.1f<br style="box-sizing: border-box;" />AggroThreat = 1.1f<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 綺懼姏鏉″闀垮嶆暟 (1 - normal, 2 - double rate, 0.5 - half rate, etc) from standard values<br style="box-sizing: border-box;" /># 娓告垙涓?br style="box-sizing: border-box;" />Rate.Rest.InGame = 1<br style="box-sizing: border-box;" /># 鍦ㄦ梾棣嗕笅綰挎椂<br style="box-sizing: border-box;" />Rate.Rest.Offline.InTavernOrCity = 1<br style="box-sizing: border-box;" /># 鍦ㄩ噹澶栦笅綰挎椂<br style="box-sizing: border-box;" />Rate.Rest.Offline.InWilderness = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 絀轟腑璺岃惤浼ゅ鍊嶆暟<br style="box-sizing: border-box;" />Rate.Damage.Fall = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鎷嶅崠 鍊嶆暟<br style="box-sizing: border-box;" /># Rate.Auction.Time (鎷嶅崠鏃墮棿鍊嶇巼),Rate.Auction.Deposit(鎷嶅崠鎶奸噾),Rate.Auction.Cut(鎷嶅崠涓婇檺)<br style="box-sizing: border-box;" />Rate.Auction.Time = 1<br style="box-sizing: border-box;" />Rate.Auction.Deposit = 1<br style="box-sizing: border-box;" />Rate.Auction.Cut = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鐭跨墿 鍊嶆暟<br style="box-sizing: border-box;" />#Rate.Mining.Next (閲囩熆鐨勫嚑鐜囧嶆暟),Rate.Mining.Amount (浜х敓鐭挎渶澶ф渶灝忕殑鍊嶆暟)<br style="box-sizing: border-box;" />Rate.Mining.Amount = 1<br style="box-sizing: border-box;" />Rate.Mining.Next = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 澶╄祴鐐圭殑鍗囩駭鍊嶇巼<br style="box-sizing: border-box;" /># 榛樿: 1<br style="box-sizing: border-box;" />Rate.Talent = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 淇濆瓨鍒鋒柊鏃墮棿 褰撶敓鐗╂ 褰撶墿浣撹鎵撳紑鎴栦嬌鐢?br style="box-sizing: border-box;" />#           0 (淇濆瓨浜?鐗╀綋鐨勫埛鏂版椂闂村湪緗戞牸鍗歌澆鐨勬椂鍊?<br style="box-sizing: border-box;" /># 榛樿: 1 (涓嶅湪緗戞牸鍗歌澆鐨勬椂鍊欎繚瀛樹漢/鐗╀綋鐨勫埛鏂版椂闂?<br style="box-sizing: border-box;" />SaveRespawnTimeImmediately = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鎶鑳界啛緇冨害鎻愬崌鍑犵巼(0..100)  <br style="box-sizing: border-box;" /># 榛樿: 100-75-25-0<br style="box-sizing: border-box;" />SkillChance.Orange = 100<br style="box-sizing: border-box;" />SkillChance.Yellow = 75<br style="box-sizing: border-box;" />SkillChance.Green = 25<br style="box-sizing: border-box;" />SkillChance.Grey = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鎬墿鑷姩鏀誨嚮鐨勮寖鍥翠箻浠ョ殑鍊嶆暟 鎴栬?鍏抽棴鑷姩鏀誨嚮<br style="box-sizing: border-box;" /># 0 - 鍏抽棴(0%)<br style="box-sizing: border-box;" /># 榛樿: 1 - 涔樹互100% <br style="box-sizing: border-box;" /># 1.5 - 涔樹互150%<br style="box-sizing: border-box;" />Rate.Creature.Aggro = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鎺у埗鍙板紑鍏?br style="box-sizing: border-box;" />#           0 - 鍏?br style="box-sizing: border-box;" /># 榛樿: 1 - 寮<br style="box-sizing: border-box;" />Console.Enable = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 榪滅▼鎺у埗鍙板紑鍏?br style="box-sizing: border-box;" /># 榛樿: 0 - 鍏?br style="box-sizing: border-box;" />#           1 - 寮<br style="box-sizing: border-box;" />Ra.Enable = 0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 榛樿榪滅▼鎺у埗IP鍦板潃,0.0.0.0涓烘墍鏈塈P鐨嗗彲.<br style="box-sizing: border-box;" />Ra.IP = 0.0.0.0<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 榛樿榪滅▼鎺у埗鍙扮鍙?br style="box-sizing: border-box;" />Ra.Port = 3443<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 榪滅▼鎺у埗鍙拌繛鎺ュ埌鏈嶅姟鍣ㄦ墍闇瑕佺殑GM絳夌駭錛岄粯璁や負(fù)3錛堢鐞嗗憳錛?br style="box-sizing: border-box;" />Ra.MinLevel = 3<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 韙㈠嚭鐢ㄦ埛錛屽鏋滀粬杈撳叆浜?jiǎn)閿欒鐨勫瘑鐮?錛堜粎闄愯繙紼嬫帶鍒跺彴錛?br style="box-sizing: border-box;" />Ra.Secure = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鏈澶ч熷害闄愬埗鍊嶇巼<br style="box-sizing: border-box;" /># 榛樿: 2 濡傛灉涓?鍒欏叧闂鏌ュ姞閫?br style="box-sizing: border-box;" />MaxOverspeedPings = 2<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鍗歌澆Grids (濡傛灉閲岀殑鍐呭瓨澶熷ぇ,鍙互紱佺敤,鎻愰珮鐜╁絎簩嬈$粡榪囨柊Grids鏃跺欑殑閫熷害)<br style="box-sizing: border-box;" /># P.S: Grids灝辨槸鍦板浘涓婂埛鍑烘潵鐨勪笢瑗?鐜╁緇忚繃涓涓湴鏂?灝變細(xì)鍔犺澆璇ュ湴鏂圭殑鐜,紱誨紑鐨勬椂鍊?灝卞嵏杞借鍦版柟鐨勭幆澧?br style="box-sizing: border-box;" /># 榛樿: 1 ( 鍗歌澆 grids) 0 ( 涓嶅嵏杞?grids)<br style="box-sizing: border-box;" />GridUnload = 1;<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 浠ヤ笅鎵鏈夌殑鏃墮棿璁劇疆閮戒互姣涓哄崟浣嶃?br style="box-sizing: border-box;" /># 榛樿绔彛閫夋嫨鏃墮棿<br style="box-sizing: border-box;" />SocketSelectTime = 10000<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 榛樿鍦板浘緗戞牸娓呯悊寤惰繜<br style="box-sizing: border-box;" />GridCleanUpDelay = 300000<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 榛樿鍦板浘鏇存柊闂撮殧<br style="box-sizing: border-box;" />MapUpdateInterval = 100<br style="box-sizing: border-box;" /># 榛樿澶╂皵鏇存柊闂撮殧<br style="box-sizing: border-box;" />ChangeWeatherInterval = 600000<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 榛樿鐜╁鏁版嵁淇濆瓨闂撮殧<br style="box-sizing: border-box;" />PlayerSaveInterval = 900000<br style="box-sizing: border-box;" /># 榛樿涓栫晫鏈嶅姟鍣ㄧ鍙?mangosd.exe 鐨勭鍙o級(jí)<br style="box-sizing: border-box;" />WorldServerPort = 8085<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鍦╩angos鍚姩瀹屾瘯鍚庤渹楦d竴澹?閫氬父鍙湪Unix nux緋葷粺涓嬪伐浣?<br style="box-sizing: border-box;" /># 榛樿: 1<br style="box-sizing: border-box;" />BeepAtStart = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 鎵撳紑/鍏抽棴 VMmap 瀵硅綰垮拰楂樺害鐨勬帹綆楁敮鎸?br style="box-sizing: border-box;" /># Default: 1 (true)<br style="box-sizing: border-box;" />#       : 0 (false)<br style="box-sizing: border-box;" />vmap.enableLOS = 1<br style="box-sizing: border-box;" />vmap.enableHeight = 1<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 涓嶄嬌鐢?VMap鍔熻兘鐨勫湴鍥綢D<br style="box-sizing: border-box;" /># 鍦板浘ID涔嬮棿鐢?','鍒嗗壊<br style="box-sizing: border-box;" /># 濡傛灉鏈夊涓湴鍥綢D浣跨敤 "鍙峰寘鍚?br style="box-sizing: border-box;" />#vmap.ignoreMapIds = "369,0,1,530"<br style="box-sizing: border-box;" />#DeeprunTram 娌℃湁鍖呭惈鍦ㄥ湴鍥句腑<br style="box-sizing: border-box;" />vmap.ignoreMapIds = "369"<br style="box-sizing: border-box;" /><br style="box-sizing: border-box;" /># 涓嶈繘琛岃綰挎帹綆楃殑鎶鑳?br style="box-sizing: border-box;" /># 鎶鑳戒箣闂翠嬌鐢?','鍒嗗壊<br style="box-sizing: border-box;" />vmap.ignoreSpellIds = "7720"</div></div></td></tr></tbody></table><img src ="http://www.shnenglu.com/ming81/aggbug/214497.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ming81/" target="_blank">鐐圭偣婊存淮</a> 2016-12-16 11:16 <a href="http://www.shnenglu.com/ming81/archive/2016/12/16/214497.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>(鎼繍宸?CritterAI瀹樻柟鏂囨。緲昏瘧銆怉n Introduction to NMGen銆?/title><link>http://www.shnenglu.com/ming81/archive/2016/11/08/214398.html</link><dc:creator>鐐圭偣婊存淮</dc:creator><author>鐐圭偣婊存淮</author><pubDate>Tue, 08 Nov 2016 13:18:00 GMT</pubDate><guid>http://www.shnenglu.com/ming81/archive/2016/11/08/214398.html</guid><description><![CDATA[<span style="font-family: Arial; color: #333333; background-color: #ffffff"><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">The purpose of NMGen is to generate navigation meshes from arbitrary source geometry. Features fall into two categories: Core and 'standard build'.</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">NMGen鐢ㄤ簬灝嗕換鎰忕綉鏍艱漿鍖栦負(fù)涓涓垨澶氫釜NavMesh銆?鍏舵墍鏈夊姛鑳介兘鍖呭惈浜庝袱涓洰褰曪細(xì) Core(鏍稿績(jī)) 鍜?'standard build'(鏅?;</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">The core features are located in the org.critterai.nmgen namespace and involve creating simplified polygon mesh data from detailed triangle-based source geometry. You can code your own build process from scratch using these features, but it will require a significant amount of work and detailed knowlege of all aspects of the process.</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">鏍稿績(jī)鍔熻兘浣嶄簬nmgen鍛藉悕絀洪棿涓嬶紝涓庡皢澶嶆潅鐨勪笁瑙掑艦mesh杞寲涓虹畝鍖栫殑澶氳竟褰esh鏈夊叧銆備綘鍙互閫氳繃浠g爜褰誨簳閲嶆柊瑙勫垝鐢熸垚榪囩▼(1)錛屼笉榪囪繖閲屾湁寰堝浜嬫儏瑕佸仛錛岃屼笖浣犻渶瑕佷簡(jiǎn)瑙g敓鎴愯繃紼嬩腑鍚勪釜鏂歸潰鐨勫疄鐜扮粏鑺?2)銆?/span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">The standard build process implements a flexible, extendable build process suitable for use at design time. It takes care of many of the mundane details for you. Its features are implemented in the following namespaces:</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">Common extentions: org.critterai.nmbuild</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">Unity extensions: org.critterai.nmbuild.u3d.editor</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">鏅氱敓鎴愭祦紼嬩負(fù)浜?jiǎn)婊…懗缂栬緫鏈熺殑闇瑕侊紝琚璁℃垚鍙彉鐨勩佸彲鎵╁睍鐨勭粨鏋勩傚畠宸茬粡涓轟綘澶勭悊濂戒簡(jiǎn)寰堝緇嗘灊鏈妭鐨勪簨鎯?3)銆傛櫘閫氬姛鑳戒綅浜庝互涓嬬殑鍛藉悕絀洪棿涓細(xì)</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">閫氱敤鎵╁睍(3): nmbuild</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">Unity鎵╁睍: nmbuild.u3d.editor</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">The standard build process has three main steps which will be covered in detail throughout the rest of this section.</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">Compile the input.</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">The NMGen Build. (Produces the polygon meshes.)</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">Create the navigation mesh.</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">鏅氱敓鎴愭祦紼嬫湁濡備笅涓変釜涓昏姝ラ錛岀◢鍚庣殑绔犺妭浼?xì)瀵箻q欎笁涓楠よ繘琛岃緇嗙殑浠嬬粛銆?/span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">緙栬瘧鏁版嵁婧?</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">璋冪敤NMGen鐨勭敓鎴愬姛鑳?鐢熸垚澶氳竟褰㈢綉鏍?.</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">鐢熸垚 Navigation Mesh.(瀵艱埅緗戞牸)</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">Note Note:</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">CAINav uses the OpenGL coordinate system.</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">娉ㄦ剰錛?/span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">CAINav浣跨敤OpenGL鍧愭爣緋葷粺.(XYZ,宸﹀彸鎵嬩粈涔堢殑);</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">(1)鐢熸垚榪囩▼鏈夊摢浜涳紵</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">(2)鍝簺鏂歸潰鐨勭粏鑺傞渶瑕佷簡(jiǎn)瑙o紵</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">(3)鐩稿浜巖ecast鐨勬墿灞?cai鏄熀浜巖ecast鐨勫姛鑳藉熀紜鑰屽疄鐜扮殑;</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">蹇熸壂鐩?/span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">1銆丄* Path Finding鏄竴涓浘鏈鐭礬寰勬悳绱㈢畻娉曪紝鍙鏁版嵁婧愭敮鎸?閬嶅巻閭誨眳"鐨勬搷浣滐紝灝卞彲浠ュ簲鐢ˋ*;</span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">2銆丳loygen Mesh 鏄嚫澶氳竟褰㈢綉鏍鹼紝鍥犱負(fù)鍑稿杈瑰艦鍐呬換鎰忎袱鐐瑰彲浠ョ洿杈?-鍦ㄦ弧瓚蟲寚瀹氱殑鍊炬枩瑙?slope limit)鍜岄珮搴﹀樊(step height)鐨勬儏鍐典笅銆?/span><br style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" /><span style="font-size: 14px; font-family: Arial; white-space: normal; text-transform: none; word-spacing: 0px; float: none; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; display: inline !important; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal">3銆佸鏋滄湁鍦板艦鐨凾riangle Mesh,鍏跺疄宸茬粡鍙互鍩轟簬瀹冭繘琛孉*浜?jiǎn)锛屽洜湄?fù)涓夎褰篃鏄嚫澶氳竟褰€傚ぇ璐瑰懆绔犵殑浣跨敤Nav Mesh鏄負(fù)浜?銆佸ぇ騫呯畝鍖栧浘鐨勫鏉傚害錛屽皢涓嶅繀瑕佺殑淇℃伅榪涜鍚堝茍銆?銆佽褰曚竴浜涢澶栫殑淇℃伅錛屾瘮濡?xxx xxx銆?/span></span><img src ="http://www.shnenglu.com/ming81/aggbug/214398.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ming81/" target="_blank">鐐圭偣婊存淮</a> 2016-11-08 21:18 <a href="http://www.shnenglu.com/ming81/archive/2016/11/08/214398.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>(鎼繍宸?CritterAI瀹樻柟鏂囨。緲昏瘧銆怌ompiling the Input銆?/title><link>http://www.shnenglu.com/ming81/archive/2016/11/08/214399.html</link><dc:creator>鐐圭偣婊存淮</dc:creator><author>鐐圭偣婊存淮</author><pubDate>Tue, 08 Nov 2016 13:18:00 GMT</pubDate><guid>http://www.shnenglu.com/ming81/archive/2016/11/08/214399.html</guid><description><![CDATA[<span style="font-family: Arial; color: #333333; background-color: #ffffff"> <div class="hvzpftn" id="article_content" class="article_content" style="white-space: normal; text-transform: none; word-spacing: 0px; color: rgb(51,51,51); text-align: left; font: 14px/26px Arial; margin: 20px 0px 0px; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; font-stretch: normal; -webkit-text-stroke-width: 0px">Compiling the Input<br />緲昏瘧錛歬un 2014.12.4<br /><br /><br />The input compile step involves gathering together all the resources needed to build the navigation mesh. This may be as simple as compiling the source geometry into the correct format, or it may be very complex, such as gathering off-mesh connections, mapping triangle type to area, gathering custom processors, etc.<br />銆愮紪璇戣緭鍏ユ暟鎹戣繖涓姝ュ湪鏁寸悊涓浜涙暟鎹紝榪欎簺鏁版嵁鍜岀敓鎴怤avigationMesh鐩稿叧銆傝繖浜涙暟鎹彲鑳藉彧鏄畝鍗曠殑灝嗗師濮嬬殑涓夎褰esh鐨勯《鐐規(guī)暟鎹漿鎹負(fù)閫傚悎NavigationMesh鐨勬暟鎹粨鏋勶紝涔熷彲浠ュ仛鍏朵粬鍗佸垎澶嶆潅鐨勪簨鎯咃紝姣斿鏀墮泦鍒嗙鐨刴esh涔嬮棿鐨勮繛鎺ュ叧緋?1)錛屽皢涓夎褰俊鎭槧灝勫埌鑷畾涔夌殑鍖哄煙鏁版嵁涓婏紝鎴栬呭噯澶囧ソ璋冨害涓浜涜嚜瀹氫箟鐨勫鐞嗘祦紼嬨?br /><br /><br /><br /><br />The results of this step are the InputGeometry, ProcessorSet, and ConnectionSet objects. (Though finalization of the connection set can be delayed to a later step.)<br />榪欎竴姝ュ畬鎴愪箣鍚庯紝浼?xì)寰楀埌濡備笅鐨勫璞″Q?InputGeometry, ProcessorSet, ConnectionSet. (ConnectionSet鍙槸鐢熸垚NavigationMesh鐨勪腑闂存暟鎹紝鏈緇堟暟鎹噷涓嶄細(xì)鍖呭惈榪欎釜瀵硅薄錛屼絾鏄細(xì)鍖呭惈鍏朵俊鎭? 鍏舵湰韜細(xì)鍦ㄤ箣鍚庣殑姝ラ閲岃閲婃斁鎺?銆?br /><br /><br />There is no standard implementation for compiling the input since the process is specific to the design environment. In Unity the input is gathered from various project assets and scene objects, such as mesh filters. In other environments it might be gathered directly from Maya or 3DSMax data.<br />緙栬瘧杈撳叆鏁版嵁鏄病鏈夋爣鍑嗗疄鐜扮殑錛岃繖涓楠や緷璧栦簬鐗瑰畾鐨勫鉤鍙板拰鐜銆傚湪Unity3D閲岋紝杈撳叆鏁版嵁鏉ヨ嚜assets鍜実ameObject錛屾瘮濡俶esh filters緇勪歡銆傚湪鍏朵粬鐜涓紝鍙兘杈撳叆鏁版嵁鐩存帴浠嶮aya鎴?DSMax妯″瀷鏂囦歡閲岃幏鍙?鎴栬呭啓榪欎簺杞歡鐨勬彃浠?銆?br /><br /><br /><br /><br />Input Geometry<br /><br /><br />The InputGeometry object consists of standard triangle mesh data (vertices and indices) with additional triangle area assignment. It is derived from the source geometry.<br />InputGeometry瀵硅薄闄や簡(jiǎn)鍖呭惈鍘熷鐨勪笁瑙掔綉鏍兼暟鎹?欏剁偣搴忓垪鍜岀儲(chǔ)寮曞簭鍒?錛岃繕鍖呮嫭瀵硅繖浜涗笁瑙掑艦鎸夌壒瀹氬尯鍩熻繘琛屽垎緇勭殑淇℃伅銆傚畠緇ф壙浜?jiǎn)鍘熷鍑犱綍浣撶殑淇℃伅銆?br /><br /><br />The InputGeometryCompiler and InputGeometryBuilder classes are used to create the input geometry object.<br />InputGeometryCompiler 鍜?InputGeometryBuidler 榪欎袱涓伐鍏風(fēng)被鐢ㄦ潵鐢熸垚 Input Geometry瀵硅薄銆?br /><br /><br />Each triangle in the input geometry is assigned an area based on surface type. Usually, triangles are assigned a default area, such as MaxArea, then special triangles are assigned special areas as needed. For example, 'meadow' and 'sidewalk' triangles may be the default area, while 'water' and 'swamp' triangles are assigned to other areas. Assigning areas during the build process ensures that polygons are properly formed for each type of surface.<br />姣忎竴涓笁瑙掑艦閮戒細(xì)琚綊鍒版煇縐嶅尯鍩熷唴錛屽尯鍩熺殑鍒掑垎涓鑸緷鎹簬鏁版嵁鎯寵〃杈劇殑鍦拌矊銆傞氬父鏉ヨ錛屼笁瑙掑艦浼?xì)琚寚瀹氫皋Z竴涓粯璁ゅ尯鍩熺被鍨嬶紝姣斿MaxArea,涓嶈繃鏈変竴浜涗笁瑙掑艦浼?xì)琚寚瀹氫竴涓壒孌婄殑鍖哄煙綾誨瀷銆備婦涓緥瀛愶紝鐢ㄦ潵琛ㄨ揪“鑽夊湴”鍜?#8220;浜鴻閬?#8221;鐨勪笁瑙掑艦浼?xì)琚寚瀹氬埌榛樿鍖哄煙锛岃?#8220;姘撮潰”鍜?#8220;娌兼辰”榪欎簺涓夎褰㈠垯浼?xì)琚寚瀹氫负鍏朵粬鐨勫尯鍩熅c誨瀷銆傚尯鍩熺被鍨嬬殑鍒掑垎鍙互紜繚鍦ㄧ敓鎴愬杈瑰艦鍒楄〃鏃訛紝涓嶄細(xì)鐢熸垚璺ㄥ湴璨岀殑澶氳竟褰€?2)<br /><br /><br /><br /><br />CopyC#<br />// Example: Creating a simple input geometry object.<br />// 渚嬪瓙: 鍒涘緩涓涓畝鍗曠殑InputGeometry瀵硅薄.<br /><br /><br />// Where 'mesh' is a TriangleMesh object containing all of the input triangles.<br />// 'mesh'瀵硅薄鏄寚涓涓綔涓哄師濮嬭緭鍏ョ殑涓夎褰㈢綉鏍煎璞?(3)<br /><br /><br />// Create an area buffer that assigns the default area id to all triangles.<br />// 鍒涘緩涓涓尯鍩焍uffer錛岄暱搴︿負(fù)涓夎褰㈢殑鏁伴噺錛屾瘡涓涓笁瑙掑艦閮戒細(xì)琚緗負(fù)榛樿鍖哄煙銆?br />byte[] areas = NMGen.CreateDefaultAreaBuffer(mesh.triCount);<br /><br /><br />// Create the builder.<br />// All triangles with a slope over 45.5f will be re-assigned to NMGen.NullArea.<br />// 鍒涘緩builder.<br />// 鎵鏈変笌xz騫抽潰澶硅瓚呰繃45.5搴︾殑涓夎闈㈤兘浼?xì)瑙嗕皋Z笉鍙揪錛屼細(xì)琚緗負(fù) NMGen.NullArea.<br />InputGeometryBuilder gbuilder = InputGeometryBuilder.Create(mesh, areas, 45.5f);<br /><br /><br />// Build in a single step.<br />// Build鎿嶄綔.<br />gbuilder.BuildAll();<br /><br /><br />// Get the result.<br />// 鑾峰彇緇撴灉,涓轟箣鍚庣殑姝ラ鍋氬噯澶?<br />InputGeometry geom = gbuilder.Result;<br /><br /><br /><br /><br />The InputGeometryCompiler class can be used to combine multiple triangle meshes into a single triangle mesh, including area assignment.<br />InputGeometryCompiler 綾誨彲浠ョ敤鏉ュ悎騫跺涓笁瑙掑艦緗戞牸,騫朵笖鍖哄煙淇℃伅涔熶細(xì)鑷姩鍚堝茍.<br /><br /><br /><br /><br />ProcessorSet<br /><br /><br />The ProcessorSet contains INMGenProcessor objects used to add special behavior to the main build step. A processor may do something simple, such as applying default flags to all polygons (ApplyPolygonFlags), or something complex such as evaluating heightfield intermediates in order to auto-generate off-mesh connections.<br />ProcessorSet鍖呭惈澶氫釜INMGenProcessor瀵硅薄,INMGenProcessor鏄竴浜涘湪鐢熸垚NavigationMesh鐨勮繃紼嬩腑鐨勭壒孌婃搷浣溿備竴涓猵rocessor鍙兘鍙仛浜?jiǎn)涓浜涚畝鍗曠殑浜嬫儏錛屾瘮濡傚皢鎵鏈夌殑澶氳竟褰㈣緗負(fù)default錛涙垨鑰呬竴浜涙洿澶嶆潅鐨勪簨鎯咃紝渚嬪璁$畻楂樺害鍥句互渚夸負(fù)鑷姩鐢熸垚鍒嗙鐨凪esh涔嬮棿鐨勮繛鎺ュ叧緋繪彁渚涙暟鎹敮鎾戙?br /><br /><br />CopyC#<br />// Example: Creating a processor set.<br />// 渚嬪瓙錛氬垱寤轟竴涓狿rocessorSet.<br /><br /><br />// There is a standard set of processors needed for almost every build.<br />// 緋葷粺宸茬粡鎻愪緵浜?jiǎn)涓濂楁爣鍑嗙殑processors,鍙互婊¤凍澶у鏁扮殑鐢熸垚.<br />myProccessorList.Add(ProcessorSet.GetStandard(ProcessorSet.StandardOptions));<br /><br /><br />// You can also add other processors, including custom processors of your own.<br />// 褰撶劧浣犲彲浠ユ坊鍔犱竴浜涜嚜宸辯殑Processor.<br />myProcessorList.Add(myCustomProcessor);<br />myProcessorList.Add(myOtherCustomProcessor);<br /><br /><br />// Create the set.<br />// 鍒涘緩ProcessorSet.<br />ProcessorSet processors = ProcessorSet.Create(myProcessorList.ToArray());<br /><br /><br /><br /><br />How these processors are used is described further in The Incremental Builder topic.<br />濡備綍浣跨敤榪欎簺processor浼?xì)鍦↖ncremental Builder绔犺妭閲岃繘琛屼粙緇?<br /><br /><br />ConnectionSet<br /><br /><br />The ConnectionSet defines the off-mesh connections that will be added to the navigation mesh. In some cases they are fully defined during the input build process. In other cases they are generated by custom processor's later in the build process.<br />ConnectionSet瀹氫箟浜?jiǎn)鍒喖浫潥凪esh鐩鎬簰涔嬮棿鏄浣曡繛鎺ョ殑錛岃繖浜涗俊鎭細(xì)琚坊鍔犲埌NavigationMesh閲屻傛湁鏃跺欒繖浜涗俊鎭彲浠ュ湪BuildInput姝ラ閲岃嚜鍔ㄧ敓鎴愶紝鑰屽彟澶栦竴浜涙椂鍊欏垯鏄敱鐢ㄦ埛鏌愪釜鑷畾涔夌殑Processor琚畨鎺掑湪浜?jiǎn)鐗瑰畾姝ラ锛屼粠鑰屾彁渚涙鍔熻兘銆?4)<br /><br /><br />The ConnectionSetCompiler can be used to dynamically compile connections for eventual inclusion in the connection set.<br />ConnectionSetCompiler鍙互鍔ㄦ佺殑瀵圭紪璇戣繛鎺ュ叧緋昏繘琛屽鐞嗭紝騫朵笖鍙互澶勭悊鍚勪釜榪炴帴涔嬮棿鐨勫寘鍚叧緋匯?5)<br /><br /><br /><br /><br /><br /><br />(1)涓浜涜煩璺冨彲杈?浼犻佸彲杈句箣綾葷殑鑷畾涔夎涓?<br />(2)鍥犱負(fù)涓嶅悓鐨勫尯鍩熷叾璺緞浠d環(huán)涓鑸細(xì)涓嶅悓錛岃繖浼?xì)鐢ㄤ簬A*涔嬬被鐨勫惎鍙戝嚱鏁頒及浠?<br />(3)鍏跺疄鏄痷3d鐨刴esh瀵硅薄,鍙互閫氳繃MeshFilter鐨刴esh灞炴у緱鍒?<br />(4)娌″お鎳?<br />(5)娌″お鎳?</div> <div id="hvzpftn" class="bdsharebuttonbox tracking-ad bdshare-button-style0-16" style="font-size: 12px; font-family: Arial, Console, Verdana, 'Courier New'; white-space: normal; text-transform: none; word-spacing: 0px; zoom: 1; float: right; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" data-bd-bind="1478611432568" data-mod="popu_172"><a class="bds_more" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://bdimg.share.baidu.com/static/api/img/share/icons_0_16.png?v=d754dcc0.png); background-repeat: no-repeat; background-position: 0px 0px; float: left; color: rgb(51,51,51); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="more"></a><a title="鍒嗕韓鍒癚Q絀洪棿" class="bds_qzone" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -52px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="qzone"></a><a title="鍒嗕韓鍒版柊嫻井鍗? class="bds_tsina" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -104px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="tsina"></a><a title="鍒嗕韓鍒拌吘璁井鍗? class="bds_tqq" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -260px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="tqq"></a><a title="鍒嗕韓鍒頒漢浜虹綉" class="bds_renren" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -208px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="renren"></a><a title="鍒嗕韓鍒板井淇? class="bds_weixin" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -1612px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="weixin"></a></div> <div class="hvzpftn" id="digg" style="font-size: 12px; font-family: Arial, Console, Verdana, 'Courier New'; white-space: normal; text-transform: none; word-spacing: 0px; font-weight: normal; color: rgb(51,51,51); padding-bottom: 15px; font-style: normal; text-align: center; padding-top: 30px; padding-left: 0px; clear: both; margin: 0px auto; orphans: 2; widows: 2; display: block; letter-spacing: normal; padding-right: 0px; width: 182px; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" articleid="41714431"> <dl onclick="btndigga();" id="btnDigg" class="digg digg_disable" style="overflow: hidden; height: 72px;background: rgb(153,153,153); float: left; color: rgb(255,255,255); text-align: center; margin: 0px 2px; display: inline-block; width: 72px"><br class="Apple-interchange-newline" /></dl></div></span><img src ="http://www.shnenglu.com/ming81/aggbug/214399.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ming81/" target="_blank">鐐圭偣婊存淮</a> 2016-11-08 21:18 <a href="http://www.shnenglu.com/ming81/archive/2016/11/08/214399.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>(鎼繍宸? CritterAI瀹樻柟鏂囨。緲昏瘧銆怲he Crowd Manager銆?/title><link>http://www.shnenglu.com/ming81/archive/2016/11/08/214397.html</link><dc:creator>鐐圭偣婊存淮</dc:creator><author>鐐圭偣婊存淮</author><pubDate>Tue, 08 Nov 2016 13:17:00 GMT</pubDate><guid>http://www.shnenglu.com/ming81/archive/2016/11/08/214397.html</guid><description><![CDATA[<span style="font-family: Arial; color: #333333; background-color: #ffffff"> <div class="hvzpftn" id="article_content" class="article_content" style="white-space: normal; text-transform: none; word-spacing: 0px; color: rgb(51,51,51); text-align: left; font: 14px/26px Arial; margin: 20px 0px 0px; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; font-stretch: normal; -webkit-text-stroke-width: 0px">The crowd manager is the big beast of the navigation components. It not only handles a lot of the path management for you, but also local steering and dynamic avoidance between navigation clients. I.e. It can keep your agents from running into each other.<br />銆怌rowdManager銆戠被鏄崄鍒嗗簽鏉傜殑涓涓被銆傚畠涓嶄粎涓轟綘澶勭悊浜?jiǎn)闈炲父澶氱殑璧\寰勭鐞嗙浉鍏崇殑浜嬫儏錛屽悓鏃朵篃澶勭悊涓浜涘眬閮ㄨ漿鍚戝拰閬垮紑鍏跺畠瀵昏礬浠g悊瀵硅薄銆備篃灝辨槸璇達(dá)紝浠栧彲浠ヨ鎵鏈夌殑浠g悊瀵硅薄涓嶄細(xì)鐩鎬簰絀挎彃銆?br /><br /><br />Core Class: CrowdManager<br />鏍稿績(jī)綾伙細(xì)CrowdManager<br /><br /><br />The NavmeshQuery and PathCorridor classes provide perfectly good, easy to use path planning features. But in the end they only give you points that your navigation client should be moving toward. When it comes to deciding things like client velocity and steering to avoid other clients, that is up to you to implement. Unless, of course, you decide to use the crowd manager.<br />NavmeshQuery鍜孭athCorridor榪欎袱涓被宸茬粡寰堜笉閿欎簡(jiǎn)錛岀敤鏉ュ仛璺緞瑙勫垝涔熻凍澶熺畝鍗曘備絾鏄鍒板簳瀹冧滑鍙槸緇欎簡(jiǎn)浣犱竴鍫嗘寚瀵艱鑹茶繍鍔ㄧ殑璺偣銆傚綋浣犲喅瀹氬疄鐜頒竴浜涜鑹蹭箣闂翠笉鍙戠敓紕版挒鐨勭壒鎬ф椂錛屽彧鑳戒綘鑷繁瀹炵幇浜?jiǎn)銆傞櫎闈烇紝褰撶劧錛屼綘鍐沖畾浣跨敤CrowdManager銆?br /><br /><br />Basically, you add an navigation client (agent) to the crowd manager, providing various configuration settings such as maximum speed and acceleration. You also provide a local target to more toward. The crowd manager then provides, with every update, the new agent position and velocity for the frame. The movement will be constrained to the navigation mesh, and steering will be applied to ensure agents managed by the crowd manager do not collide with each other.<br />鍩烘湰涓婃潵璁詫紝浣犲彲浠ュ線CrowdManager娣誨姞涓涓鑹詫紝鍚屾椂鎻愪緵涓浜涢厤緗暟鎹紝渚嬪鏈澶ч熷害鍜屽姞閫熷害銆備綘涔熷彲浠ユ彁渚涗竴涓眬閮ㄧ殑鐩爣(璁╄鑹茶嚜涓葷殑縐誨姩榪囧幓(1))銆傜劧鍚嶤rowdManager浼?xì)鍦ㄦ瘡鍝徭洿鏂扮殑鏃跺欒緗鑹茬殑鏈鏂頒綅緗拰閫熷害銆傝繍鍔ㄤ細(xì)琚害鏉熷湪Navmesh鍐咃紝CrowdManager浼?xì)璁╄鑹插湪闇瑕佺殑鏃跺欒繘琛岃漿鍚戯紝浠ョ‘淇濅笉浼?xì)鐩镐簰纰般?br /><br /><br />This is very powerful feature set. But it comes with limitations.<br />The biggest limitation is that you must give control of the agent's position and velocity completely over to the crowd manager. You can update things like maximum speed and acceleration. But in order for the crowd manager to do its thing, it can't allow you to constantly be giving it overrides to position and velocity. So you give up direct control of the agent's movement. It belongs to the crowd manager.<br />The second biggest limitation revolves around the fact that the crowd manager deals with local planning. The agent's target should never be more than 256 polygons aways from its current position. If it is, you risk your agent failing to reach its target. So you may still need to do long distance planning and provide the crowd manager with intermediate targets.<br /><br /><br />榪欐槸涓涓潪甯稿己澶х殑鐗規(guī)ч泦銆備絾鏄畠浼撮殢鐫涓浜涢檺鍒躲?br />鏈澶х殑闄愬埗鍦ㄤ簬浣犲繀欏誨皢瑙掕壊鐨勪綅緗拰閫熷害瀹屽叏浜ょ粰C(jī)rowdManager鏉ユ帶鍒躲備綘鍙互鏇存柊綾諱技鏈澶ч熷害鍜屽姞閫熷害涔嬬被鐨勫弬鏁般備絾鏄負(fù)浜?jiǎn)璁〤rowdManager鑳芥甯稿伐浣滐紝浣犱笉鑳界粡甯哥殑鏀瑰彉瑙掕壊鐨勪綅緗拰閫熷害銆傚洜姝や綘闇瑕佹斁寮冪鐞嗚鑹茶繍鍔ㄣ傝繖涓伐浣滅幇鍦ㄥ睘浜嶤rowdManager銆?br /><br /><br /><br /><br />Other significant limitations:<br />All agents using the crowd manager use the same NavmeshQueryFilter.<br />Crowd management is relatively expensive. The maximum agents under crowd management at any one time is around 20.<br /><br /><br />鍏朵粬鏄庢樉鐨勯檺鍒?br />鎵鏈夋墭綆$殑瑙掕壊閮戒嬌鐢ㄥ悓鏍風(fēng)殑鏌ヨ榪囨護(hù)鍣?br />浜虹兢綆$悊鐨勫紑閿鐩稿杈冨ぇ銆傚彲浠ョ鐞嗙殑浜虹兢鐨勪釜浣撴暟閲忔渶澶х害涓?0涓?1)銆?br /><br /><br />The Sample Pack includes a Crowd Manager Demo that lets you see the manager in action.<br /><br /><br /><br /><br />(1)闇瑕佸疄楠?<br />(1)榪欎釜鏁伴噺鏄竴涓漢涓虹殑闄愬埗錛屽彲浠ラ氳繃淇敼浠g爜紿佺牬姝ら檺鍒躲?/div> <div id="hvzpftn" class="bdsharebuttonbox tracking-ad bdshare-button-style0-16" style="font-size: 12px; font-family: Arial, Console, Verdana, 'Courier New'; white-space: normal; text-transform: none; word-spacing: 0px; zoom: 1; float: right; font-weight: normal; color: rgb(51,51,51); font-style: normal; text-align: left; orphans: 2; widows: 2; letter-spacing: normal; background-color: rgb(255,255,255); text-indent: 0px; -webkit-text-stroke-width: 0px; font-variant-ligatures: normal; font-variant-caps: normal" data-bd-bind="1478611370148" data-mod="popu_172"><a class="bds_more" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://bdimg.share.baidu.com/static/api/img/share/icons_0_16.png?v=d754dcc0.png); background-repeat: no-repeat; background-position: 0px 0px; float: left; color: rgb(51,51,51); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="more"></a><a title="鍒嗕韓鍒癚Q絀洪棿" class="bds_qzone" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -52px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="qzone"></a><a title="鍒嗕韓鍒版柊嫻井鍗? class="bds_tsina" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -104px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="tsina"></a><a title="鍒嗕韓鍒拌吘璁井鍗? class="bds_tqq" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -260px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="tqq"></a><a title="鍒嗕韓鍒頒漢浜虹綉" class="bds_renren" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -208px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="renren"></a><a title="鍒嗕韓鍒板井淇? class="bds_weixin" style="cursor: pointer; font-size: 12px; height: 16px;background-image: url(http://www.shnenglu.com/ming81/img/share/icons_0_16.png?v=91362611.png); background-repeat: no-repeat; background-position: 0px -1612px; float: left; color: rgb(51,102,153); padding-left: 17px; text-decoration: none; margin: 6px 6px 6px 0px; line-height: 16px" target="_blank" data-cmd="weixin"></a></div></span><img src ="http://www.shnenglu.com/ming81/aggbug/214397.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ming81/" target="_blank">鐐圭偣婊存淮</a> 2016-11-08 21:17 <a href="http://www.shnenglu.com/ming81/archive/2016/11/08/214397.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>(鎼繍宸? CritterAI瀹樻柟鏂囨。緲昏瘧銆怲he Path Corridor銆?/title><link>http://www.shnenglu.com/ming81/archive/2016/11/08/214396.html</link><dc:creator>鐐圭偣婊存淮</dc:creator><author>鐐圭偣婊存淮</author><pubDate>Tue, 08 Nov 2016 13:16:00 GMT</pubDate><guid>http://www.shnenglu.com/ming81/archive/2016/11/08/214396.html</guid><description><![CDATA[<span style="color: #333333; font-family: Arial; background-color: #ffffff;">The Path Corridor</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">緲昏瘧錛歬un 2014.12.4</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The path corridor provides a way of moving along a navigation path without worrying about the minutiae of managing the path.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">寤婇亾鎻愪緵浜?jiǎn)涓縐嶆部鎸囧畾瀵艱埅璺緞榪涜縐誨姩錛岃屼笉蹇呮媴蹇?jī)绠$悊鋴社敤璧\寰勬暟鎹椂鐨勭粏鑺傞棶棰樸?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Core Class: PathCorridor</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鏍稿績(jī)綾伙細(xì)PathCorridor</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">In the simplest scenario, a path is a list of waypoints from a starting point to an end point. The waypoints form a connected set of line segments along which a navigation client moves. But </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">navigation is much more complex in the real world. There are locomotion limitations, local steering restrictions, dynamic obstacle avoidance, and good old floating point errors. All of these </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">issues can make management of a path difficult.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍦ㄦ渶綆鍗曠殑鎯呮櫙閲岋紝涓涓礬寰勬槸涓緇勪粠寮濮嬬偣鍒扮粨鏉熺偣鐨勮礬鐐瑰垪琛ㄣ傚鏋滆兘綺劇‘鐨勬寜鐓т嬌鐢ㄦ瀵艱埅鏁版嵁榪愬姩錛岃鑹茬殑杞ㄨ抗浼?xì)鏄竴緇勭浉浜掕繛鎺ョ殑綰挎銆備絾鏄湪鐪熷疄鐜涓嬭繘琛屽鑸瘮榪欎釜瑕佸鏉傜殑澶氥備綘闇瑕佽冭檻瑙掕壊鐨勮繍</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍔ㄨ兘鍔涚殑灞闄愭?1)銆佸眬閮ㄨ漿鍚戦檺鍒躲侀伩寮鍔ㄦ侀殰紕嶇墿銆佷互鍙?qiáng)涓浜涘父瑙佺殑嫻偣鏁伴敊璇傛墍鏈夎繖浜涙儏鍐甸兘浼?xì)璁┙帯鐞嗕竴涓礬寰勭殑浣跨敤鍙樺緱鍥伴毦銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Navigation based on a polygon mesh provides a different abstraction than just a list of waypoints. The path returned by the NavmeshQuery class is a list of polygons. Technically, a client can </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">move freely anywhere within this corridor of polygons. If a client strays outside the corridor, then the corridor can be patched up using local searches rather than full path replanning.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍦ㄤ竴涓杈瑰艦緗戞牸涓婅繘琛屽鑸瘮鍦ㄤ竴鍫嗚礬鐐逛笂榪涜瀵艱埅瑕佹洿鍔犳娊璞′竴浜涖侼avmeshQuery榪斿洖鐨凱ath鏄竴緇勫杈瑰艦銆傛妧鏈笂璁詫紝涓涓鑹插彲浠ュ湪榪欎釜寤婇亾涓婄殑浠繪剰澶氳竟褰㈠唴鑷敱鐨勭Щ鍔ㄣ傚鏋滀竴涓鑹茶窇鍑轟簡(jiǎn)榪欎釜寤婇亾鐨勮寖</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍥達(dá)紝寤婇亾鐨勮寖鍥村彲浠ヤ嬌鐢ㄥ眬閮ㄦ悳绱㈣繘琛屾墿澶э紝鑰屼笉鏄噸鏂拌鍒掓暣鏉¤礬寰勩?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The path corridor is loaded with a path, a start point, and a target point. It is then used to move the navigation client through the corridor. It handles path straightening, constraining the </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">client to the navigation mesh, and adjusting the corridor due to inaccurate client locomotion.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">寤婇亾闇瑕佸姞杞戒竴涓狿ath銆佷竴涓搗濮嬬偣銆佷竴涓洰鏍囩偣銆傜劧鍚庣敤浜庤鑹插湪榪欎釜寤婇亾鍐呯Щ鍔ㄣ傚畠澶勭悊璺緞鐨勭煫姝c佺‘淇濊鑹蹭笉浼?xì)璺戝嚭Navmesh銆佷互鍙?qiáng)褰撹鑹部U誨姩瓚呭嚭棰勬湡鏃朵慨姝e粖閬撲俊鎭?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The PathCorridor API is well documented. The only thing worth repeating here is a warning: You can't just initialize a corridor with a path and forget long distance path planning. Since the </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">path corridor class uses local searches to maintain the corridor, attempting to apply large delta movement to the corridor's position or target can result in a malformed corridor. Details are </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">in the API documentation.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">PathCorridor API宸茬粡鏈夎緇嗙殑鏂囨。璇存槑浜?jiǎn)銆傚湪榪欓噷鍙湁涓鐐瑰煎緱鎻愪竴涓嬶細(xì)浣犱笉鑳藉彧鍒涘緩涓涓粖閬撶劧鍚庝竴鍒囬兘浜ょ粰瀹冨幓鍋氾紝鑰屼笉榪涜闀胯礬寰勮鍒掋傝櫧鐒跺粖閬撲嬌鐢ㄤ簡(jiǎn)灞閮ㄦ悳绱㈡潵緇存寔寤婇亾瀹屾暣鎬э紝涓嶈繃濡傛灉鍦ㄥ粖閬撻噷浜х敓涓</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">涓ぇ鐨勮繍鍔ㄨ窛紱伙紝鎴栬呯洰鏍囩偣紱誨緱寰堣繙錛屼細(xì)浜х敓涓涓暩褰㈢殑寤婇亾(1)銆傛洿澶氱殑緇嗚妭鍙互鍙傝冪浉鍏矨PI鏂囨。銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">(1)鍔犻熴佸噺閫熴佹儻鎬т箣綾葷殑榪愬姩鍙傛暟.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">(2)鍟ユ剰鎬?</span><img src ="http://www.shnenglu.com/ming81/aggbug/214396.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ming81/" target="_blank">鐐圭偣婊存淮</a> 2016-11-08 21:16 <a href="http://www.shnenglu.com/ming81/archive/2016/11/08/214396.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>(鎼繍宸?CritterAI瀹樻柟鏂囨。緲昏瘧銆怲he Navigation Query銆?/title><link>http://www.shnenglu.com/ming81/archive/2016/11/08/214395.html</link><dc:creator>鐐圭偣婊存淮</dc:creator><author>鐐圭偣婊存淮</author><pubDate>Tue, 08 Nov 2016 13:15:00 GMT</pubDate><guid>http://www.shnenglu.com/ming81/archive/2016/11/08/214395.html</guid><description><![CDATA[<p style="color: #333333; font-family: Arial; background-color: #ffffff;"><span style="line-height: 26px;">緲昏瘧錛歬un 2014.12.4</span><br /></p><p style="color: #333333; font-family: Arial; background-color: #ffffff;">The navigation mesh query is the most important class to understand since most navigation clients will interact with the query rather than the navigation mesh itself. The mesh contains the data, but the query provides almost all of the features necessary for pathfinding.<br />鐢ㄦ埛鍜宯avigation mesh query(Navmesh鏌ヨ鍣?鎵撲氦閬撶殑嬈℃暟姣擭avmes鏈韓澶氱殑澶氥傜綉鏍煎寘鍚暟鎹紝浣嗘槸鏌ヨ鍣ㄦ彁渚涗簡(jiǎn)鍑犱箮鍏ㄩ儴鐨勫璺壒鎬с?/p><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Core Class: NavmeshQuery</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鏍稿績(jī)綾伙細(xì)NavmeshQuery</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Query features fall into two general categories: Pathfinding and local search.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鏌ヨ鍣ㄧ殑鐗規(guī)у寘鎷袱涓ぇ鐨勬柟闈細(xì)瀵昏礬鍜屽眬閮ㄦ悳绱€?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Pathfinding involves standard A* and Dijkstra searches that find the best path(s) between two points. Paths are made up of a list polygon references that represent a polygon corridor from the start to the end position. Path straightening is used to convert the path into a list of waypoints. (I.e. String pulling.)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">瀵昏礬浣跨敤鏍囧噯鐨凙*鍜孌ijkstra綆楁硶錛岀敤浜庢壘鍑轟袱鐐逛箣闂存渶濂界殑璺緞(鍙兘涓嶆涓鏉?銆侾ath(璺緞)鏄敱涓緇凱olygon鐨勫紩鐢?1)緇勬垚鏁版嵁錛屼粠寮濮嬬偣鍒扮粨鏉熺偣銆傝礬寰勭煫姝f槸灝嗕竴涓狿ath鏁版嵁杞負(fù)涓緇勮礬鐐規(guī)暟鎹?鍗砈tring pulling(緇沖瓙鎷夌洿))(2)銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The local search features offer various methods for locating polygons and points on polygons, and for querying the local environment. I.e. Raycasting, finding the distance to the nearest wall, etc.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">灞閮ㄦ悳绱㈠姛鑳芥彁渚涘縐嶆柟寮忚繘琛屽杈瑰艦鍜屽杈瑰艦涓婄殑鐐圭殑瀹氫綅錛屼互鍙?qiáng)鏌ヨ灞閮ㄧ殑涓浜涚幆澧冧俊鎭傛瘮濡傚皠綰挎煡璇€佽綆楃鏈榪戠殑澧欑殑璺濈涔嬬被鐨勩?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Many of the query methods require a NavmeshQueryFilter. Filters define area traversal costs as well as flags used for including/excluding polygons and off-mesh connections from results.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">璁稿鏌ヨ鏂規(guī)硶瑕佹眰涓涓狽avmeshQueryFilter(鏌ヨ榪囨護(hù)鍣?銆傝繃婊ゅ櫒瀹氫箟浜?jiǎn)Polygon鍜宱ff-mesh connections鐨勭┛瓚婁唬浠鳳紝浠d環(huán)鍊煎彲浠ュ弬涓庡惎鍙戝紡鐨勮綆楋紝鐢ㄦ潵鍐沖畾鏄惁鍦ㄦ渶緇堣礬寰勯噷鍖呭惈/鎺掗櫎鏌愪釜Polygon鎴杘ff-mesh connections銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The best way to understand the query class is to play around with it. The Sample Pack includes the Query Explorer demo that permits experimentation with all of the main query features.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鐞嗚В鏌ヨ鍣ㄧ殑鏈濂藉姙娉曞氨鏄敤涓鐢ㄣ傘怱ample Pack(紺轟緥鍖?銆戦噷鐨勩怮uery Explorer(鏌ヨ婕旂ず)銆慸emo灞曠ず浜?jiǎn)鏌ヨ鍣ㄤ竴浜涗富瑕佺殑鐗規(guī)с?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Common Operations</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">閫氱敤鎿嶄綔</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">This section contains some simple examples of common query operations.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Finding a Point in the Navigation Mesh</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">You can't do much without first getting a valid point on the navigation mesh. So the first step is to find one.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">GetNearestPoint(Vector3, Vector3, NavmeshQueryFilter, NavmeshPoint)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鏈妭鏄緥瀛?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鏌ヨ涓涓湪Navmesh涓婄殑鐐?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">濡傛灉浣犳病鏈変竴涓狽avmesh涓婄殑璧峰鐐圭殑璇濓紝浣犺兘鍋氱殑涓嶅銆傛墍浠ョ涓閮ㄥ氨鏄壘涓涓偣銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">GetNearestPoint(Vector3, Vector3, NavmeshQueryFilter, NavmeshPoint)鍑芥暟鎻愪緵姝ゅ姛鑳姐?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">CopyC#</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// Where 'query' is a NavmeshQuery object and 'filter' is a NavmeshQueryFilter object.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 'position' is a Vector3 indicating the world position of the client.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 'query'鏄竴涓?NavmeshQuery瀵硅薄錛?filter'鏄竴涓狽avmeshQueryFilter瀵硅薄銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 'position' 鏄竴涓猇ector3瀵硅薄錛屽間負(fù)瑙掕壊鐨勪笘鐣屽潗鏍囥?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">NavmeshPoint result;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Vector3 extents = new Vector3(1, 1, 1);  // Keep this to the minimum extents practical. // 鑼冨洿瓚婂皬瓚婂ソ銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">NavStatus status = query.GetNearestPoly(position, extents, filter</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        , out result);</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">if (result.polyRef == Navmesh.NullPoly)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">{</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // Handle error.  Could not find a result.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // The status can be checked to see if there was an error.  If not, then</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // the cause is that the search extents did not overlap any polygons.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // 閿欒澶勭悊銆傛壘涓嶅埌緇撴灉銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // 鍙互媯(gè)鏌ョ姸鎬佺湅鐪嬫槸浠涔堥棶棰樸傚鏋滄病鏈夐棶棰橈紝璇存槑鎸囧畾鑼冨洿閲屼笉鍖呭惈澶氳竟褰€?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">}</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// Use the result point, which includes a vector point and the reference of </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// the polygon that contains the point.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">//浣跨敤緇撴灉鐐廣傚寘鎷竴涓猇ector3鐨勭偣鍜屽寘鍚繖涓偣鐨凱olygon鐨勫紩鐢ㄣ?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Basic Pathfinding</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Even if you are planning to use PathCorridor or CrowdManager, you'll always need to do long distance planning using the basic NavmeshQuery features. First, get a path, then optionally straighten it.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍩虹鐨勫寰?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍗充嬌浣犳墦綆椾嬌鐢╬athcorridor鎴朿rowdmanager,浣犱篃浼?xì)闇瑕丯avmeshQuery鐨勫姛鑳芥潵瀹屾垚涓浜涢暱璺濈璺緞瑙勫垝銆傜涓錛岃幏鍙栦竴鏉¤礬寰勶紝鐒跺悗閫夋嫨鎬х殑寮勭洿瀹?3)銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">CopyC#</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// Where 'query' is a NavmeshQuery object and 'filter' is a NavmeshQueryFilter object.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 'start' and 'end' are NavmeshPoints known to be on the navigation mesh.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 'query'鏄竴涓?NavmeshQuery瀵硅薄錛?filter'鏄竴涓狽avmeshQueryFilter瀵硅薄;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 'start' 鍜?'end' 鏄凡鐭ョ殑鍦∟avmesh涓婄殑鐐?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">int pathCount;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// The path will be a list of polygon references.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// path鏄竴緇刾olygon鐨勫紩鐢?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">uint[] path = new uint[100];  // Size for maximum allowed path length. // 璺緞鐨勬渶澶ч暱搴?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">NavStatus status;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">if (start.polyRef == end.polyRef)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">{</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // No need to do any planning.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // 寮濮嬬偣鍜岀粨鏉熺偣鍦ㄥ悓涓涓杈瑰艦鍐咃紝涓嶉渶瑕佽繘琛岃礬寰勮鍒?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        pathCount = 1;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        path[0] = start.polyRef;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">}</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">else</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">{</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        status = query.FindPath(start, end, filter, path</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">                , out pathCount);</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        if (NavUtil.Failed(status) || path.pathCount == 0)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        {</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">                // Handle pathfinding failure.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">                // 澶勭悊瀵昏礬澶辮觸;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        }</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        else if (end.polyRef != path[pathCount - 1])</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        {</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">            // Handle a partial path.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">            // The query either could not reach the end point,</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">            // or the path buffer was too small to hold the</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">            // entire path.  (A check of 'status' will reveal if</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">            // the buffer was too small.)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">            // 澶勭悊鍙湁涓閮ㄥ垎璺緞鐨勬儏鍐?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">            // 鍙兘鏄粨鏉熺偣涓嶅彲杈?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">            // 鎴栬呰礬寰勭殑buffer闀垮害澶皬錛岃涓嶄笅鏁存潯璺緞;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">            // 濡傛灉鏄痓uffer澶皬錛屽彲浠ユ鏌tate;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        }</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">}</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// If you need to straighten the path...</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 濡傛灉浣犻渶瑕佹媺鐩磋礬寰?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">const int MaxStraightPath = 4;  // Just getting the first 4 waypoints. // 鍙鐞嗗墠4涓礬鐐?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">int wpCount;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// The waypoints.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 璺偣鍒楄〃;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Vector3[] wpPoints = new Vecotr3[MaxStraightPath];</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// A list of polygon references.  (The polygon being entered at each waypoint.)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 涓涓杈瑰艦寮曠敤鍒楄〃;(璺偣鏄杈瑰艦鐨勫叆鍙g偣)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">uint[] wpPath = new uint[MaxStraightPath];</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// The type of each waypoint. (Start, end, off-mesh connection.)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 姣忎竴涓礬鐐圭殑綾誨瀷淇℃伅.(寮濮嬬偣錛岀粨鏉熺偣, 榪炴帴);</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">WaypointFlag[] wpFlags = new WaypointFlag[MaxStraightPath];</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">status = query.GetStraightPath(start.point</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        , goal.point</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        , path</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        , 0                // The index of the start of the path. // 璺緞鐨勫紑濮嬬偣;</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        , pathCount        // The length of the path.             // 璺緞鐨勯暱搴?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        , wpPoints</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        , wpFlags</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        , wpPath</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        , out wpCount);</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">if (NavUtil.Failed(status) || wpCount == 0)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">{</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // Handle the failure.  There should always be at least one waypoint </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // (the goal) for a valid point/path combination,</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">        // 澶勭悊澶辮觸銆傚簲璇ユ繪槸瀛樺湪涓涓偣(鐩爣鐐?鐢ㄤ簬璺緞鍚堝茍.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">}</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// Use the path and waypoints.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">// 浣跨敤璺緞鍜岃礬鐐?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">(1)鍙互鐞嗚В涓哄彞鏌勶紝鎴栫儲(chǔ)寮曘?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">(2)Path涓婃瘡涓杈瑰艦涓績(jī)涔嬮棿鐨勮繛綰夸竴鑸笉浼?xì)鏄洿绾垮Q岃礬寰勫鏋滄湁鎷愯涔熶細(xì)閫犳垚涓浜涚編瑙備笂鐨勯棶棰橈紝榪欎釜鏃跺欓渶瑕佷嬌鐢ㄧ壒瀹氱殑鏂規(guī)硶灝嗚礬寰勫彉寰楀敖閲忕瑪鐩達(dá)紝灝卞ソ鍍忓皢涓鏍圭懷瀛愭媺鐩淬?/span><img src ="http://www.shnenglu.com/ming81/aggbug/214395.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ming81/" target="_blank">鐐圭偣婊存淮</a> 2016-11-08 21:15 <a href="http://www.shnenglu.com/ming81/archive/2016/11/08/214395.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>(鎼繍宸?CritterAI瀹樻柟鏂囨。緲昏瘧銆怲he Navigation Mesh銆?/title><link>http://www.shnenglu.com/ming81/archive/2016/11/08/214394.html</link><dc:creator>鐐圭偣婊存淮</dc:creator><author>鐐圭偣婊存淮</author><pubDate>Tue, 08 Nov 2016 13:14:00 GMT</pubDate><guid>http://www.shnenglu.com/ming81/archive/2016/11/08/214394.html</guid><description><![CDATA[<span style="color: #333333; font-family: Arial; background-color: #ffffff;">The Navigation Mesh</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">緲昏瘧錛歬un 2014.12.4 </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The navigation mesh is the primary data model for the navigation system. The only user component that deals directly with the mesh on a regular basis is the component that is responsible for creating the mesh and managing its state. Normal navigation clients, the one's needing to perform pathfinding and such, rarely if ever interact directly with the navigation mesh.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">NavigationMesh鏄鑸郴緇熺殑涓昏鏁版嵁妯″瀷銆傜敤鎴峰彧闇瑕佸垱寤哄鑸綉鏍兼暟鎹拰緇存姢鏁版嵁鐘舵併傞渶瑕佷嬌鐢ㄥ鑸殑鍦版柟涓鑸槸榪涜瀵昏礬鎿嶄綔錛屽伓灝?dāng)涔熷彲浠ヤ娇鐢╪avmesh榪涜涓浜涗氦浜掋?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Core Class: Navmesh</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鏍稿績(jī)綾伙細(xì)Navmesh</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The Data Model</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鏁版嵁妯″瀷</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Tiles</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">At the core of the navigation mesh is the tile. Tiles hold the vast majority of structural and state information. In fact, the Navmesh class is little more than a tile manager. It may consist of a single tile, or many tiles laid out in a grid that can be swapped in and out at runtime.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The tile based structure of the navigation mesh adds a lot of flexibility. As mentioned, tiles can be swapped in and out at runtime. This means that the mesh can represent a large area, but not all tiles have to be loaded and active, reducing the mesh's memory footprint. This also allows for a situation where individual tiles can be rebuilt without the need to rebuild the entire mesh.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Tiles(鐗囧尯)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Navmesh鐨勬牳蹇?jī)姒傚康涔嬩竴灝辨槸Tile銆俆iles瀛樻斁浜?jiǎn)澶у鏁扮殑缁撴瀯淇℃伅鍜岀姸鎬佷俊鎭備簨瀹炰笂錛孨avmesh綾繪湁鐐瑰儚涓涓猅ileManager銆侼avmesh鍙互鐢卞崟涓猅ile鏋勬垚錛屼篃鍙互鍚戠綉鏍間竴鏍風(fēng)殑騫抽摵寮鏉ワ紝浠ヤ究鍦ㄨ繍琛屾湡鍔ㄦ佺殑鏇挎崲鍏朵腑鐨勬煇涓猅ile銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Structural Elements</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The tile's structural data is what defines the navigation graph used for pathfinding. It consists of two types of elements: Polygons and off-mesh connections.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The core of the structure is a mesh of convex polygons with between three and MaxAllowedVertsPerPoly vertices. This mesh is in the same format as NMGen's PolyMesh structure, and usually represents an abstraction of a scene's static geometry.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Off-mesh connections are optional. They consist of two connected endpoints, at least one of which resides within a polygon in the polygon mesh. Off-mesh connections are added to the navigation graph as a single edge and represent special travel routes not defined by scene geometry. Think: The route an agent travels if it jumps over a railing that normally blocks movement.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鑺傜偣鍏冪礌</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Tile鐨勬暟鎹粨鏋勬槸涓涓敤浜庡璺殑graph(鍥?銆傚畠鐢變袱縐嶆暟鎹粨鏋勭粍鎴愶細(xì)Polygons(澶氳竟褰㈤泦鍚?鍜宱ff-mesh connections(鍒嗙鐨勭綉鏍間箣闂寸殑榪炴帴鍏崇郴闆嗗悎)銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Off-mesh connections(鍒嗙鐨勭綉鏍間箣闂寸殑榪炴帴鍏崇郴闆嗗悎)鍙互娌℃湁銆傚畠鐢變袱涓浉浜掕繛鎺ョ殑绔偣鏋勬垚錛岃嚦灝戜竴杈瑰湪鏌愪釜澶氳竟褰㈤噷銆侽ff-mesh connections浣滀負(fù)鍗曠嫭鐨勮竟娣誨姞鍒板浘鐨勬暟鎹粨鏋勯噷銆傚畠浠h〃鐫涓縐嶇壒孌婄殑琛岃蛋璺嚎錛屽茍涓斾笉鏄敱鍘熷鍦烘櫙鐨勫嚑浣曚綋鐢熸垚鐨勩傛兂璞′竴涓嬶紝涓涓鑹茶煩榪囦竴涓爮鏉?鏍忔潌鍙互闃葷鏅氱殑鍓嶈繘銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">State Data</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Tiles also contain state data. This data is associated with individual polygons and off-mesh connections. State data includes area and flags.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Areas are used to associate traversal cost to structural elements. This effects pathfinding. For example, the area representing swampland can have a higher cost than the area representing smooth surfaces such as meadowland.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Flags can be used to control when a structural element is traversable. For example, a flag can be set on the polygon below a door to indicate that it is closed and locked. Or a flag can indicate that only agents of a particular type are allowed to traverse the element.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">It is important to note that areas and flags have no meaning within the navigation mesh itself. The interpretation of the values is dependant on the NavmeshQueryFilter used by each navigation client. For example: One filter may define a cost of 10 for area id 5, while another may define a cost of 2 for the same area. One flag may be set when a door is closed with one filter checking for the flag during pathfinding, while another filter, used by a ghost, ignores the flag completely.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鐘舵?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Tile鍖呮嫭浜?jiǎn)涓浜涚姸鎬佷俊鎭傜姸鎬佺敤鏉ュ尯鍒嗕笉鍚岀殑Polygons鍜宱ff-mesh connections銆傜姸鎬佹暟鎹寘鎷琣reas(鍖哄煙淇℃伅)鍜宖lags(鏍囧織浣?銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Areas(鍖哄煙)涓鑸敤鏉ュ畾涔夌Щ鍔ㄤ唬浠風(fēng)殑銆備唬浠峰獎(jiǎng)鍝嶅璺備婦涓緥瀛愶紝絀胯秺琚爣璁頒負(fù)娌兼辰鐨勫尯鍩熸椂鐨勪唬浠瘋姳璐瑰彲鑳芥瘮絀胯秺鏍囪涓鴻崏鍦扮殑鍖哄煙鐨勪唬浠瘋楂樸?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Flags(鏍囧織浣?鍙互鐢ㄦ潵鎺у埗涓涓妭鐐圭殑鍙璧板睘鎬с備婦涓緥瀛愶紝涓涓綔涓?闂?鐨勫杈瑰艦錛屽湪闂ㄥ叧闂殑鏃跺欙紝鍙互緇欒繖涓杈瑰艦璁劇疆涓涓壒孌婄殑鏍囧織浣嶏紝浠ヨ〃紺哄畠鏄笉鍙氳繃鐨勩傛垨鑰呰緗竴涓壒孌婄殑鏍囧織浣嶏紝鍙厑璁哥壒瀹氱被鍨嬬殑瑙掕壊閫氳繃銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Areas鍜孎lags鐨勬剰涔変笉鏄敱Navmesh瀹氫箟鐨勶紝榪欓潪甯擱噸瑕併傝繖浜涚壒鍒寚瀹氱殑鏁板瓧閮芥槸鐢卞鑸郴璁ょ殑鐢ㄦ埛緋葷粺鑷畾涔夌殑NavmeshQueryFilter鏉ヨВ閲婄殑銆備婦涓緥瀛愶細(xì)涓涓繃婊ゅ櫒璁や負(fù)ID涓?鐨勫尯鍩熷叿鏈?0鐐硅礬寰勪唬浠鳳紝鑰屽彟涓涓繃婊ゅ櫒鍒欒涓哄彧鏈?鐨勮礬寰勪唬浠楓傚綋涓涓叧闂殑闂ㄧ殑鏍囧織浣嶈璁劇疆鍚?1)錛屼竴縐嶈繃婊ゅ櫒鍦ㄥ璺殑鏃跺欏氨浼?xì)鑰冭檻榪欑鎯呭喌鑰屽皢榪欎釜闂ㄨ涓轟笉鍙氳繃錛屽彟澶栦竴縐嶈繃婊ゅ櫒-鍙兘鏄敤浜庨欖傜殑瀵昏礬-灝變細(xì)瀹屽叏蹇界暐榪欎釜鏍囧織浣嶈屽皢姝よ妭鐐硅涓烘槸鍙氳繃鐨勩?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Structure Versus State</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Why is it important to know the difference between structural elements and state data?</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The first reason is that it is possible to save and load state separately from structure. One common use case is to have a serialized version of the full navigation mesh that represents its default state. Then serialized versions of various states, such as the last runtime state, are used to overwrite the default state as needed.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The main limitation is that a state is only valid for a particular structure. So you can't, for example, save the state, change the tile structure, then load the original state into the new structure.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The second reason for understanding the difference between structure and state has to to with tile and polygon references...</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">緇撴瀯VS鐘舵?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鑺傜偣鍏冪礌鍜岀姸鎬佷箣闂磋繘琛屼簡(jiǎn)鍒嗙錛岀悊瑙h繖鐐歸潪甯擱噸瑕併?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">棣栧厛錛岃繖鏍峰畠浠彲浠ョ嫭绔嬬殑榪涜淇濆瓨鍜屽姞杞姐備竴涓氬父鐨勬儏鍐墊槸錛屽姞杞戒竴涓鍒剁殑Navmesh鏁版嵁鍚庯紝鍏朵腑鐨勭姸鎬佸彲鑳介兘鏄粯璁ゅ鹼紝鑰屽埄鐢ㄤ竴涓笂涓嬈¤繍琛屾椂淇濆瓨鐨勪覆琛屽寲鐨勭姸鎬佺紦瀛橈紝鍙互瑕嗙洊鍘熷鐨勭姸鎬佷俊鎭?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">涓嶈繃榪欓噷鏈変竴涓檺鍒訛紝鐘舵佷俊鎭拰鑺傜偣鑷韓鏄簿紜尮閰嶇殑銆備綘涓嶈兘鍦ㄦ洿鏀瑰畬涓涓妭鐐圭殑淇℃伅鍚庯紝鍙堝皢涓涓佺殑鐘舵佽祴緇欏畠銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">絎簩鐐瑰垯鏄Tile鍜孭olygon鐨勫紩鐢ㄦ柟寮忋?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Tile and Polygon References</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The last bit of information needed to understand the navigation mesh is the concept of tile and polygon references. These values are one of the few data types that are defined by the navigation mesh rather than the tiles within the mesh. It is important to understand what references are because they are used by various classes to automatically invalidate pathfinding data if the structure of a navigation mesh changes.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Essentially, tile and polygon references are unsigned integer 'handles' to structural elements within a navigation mesh. Tile references are rarely used by navigation clients, while polygon references are all over the place. Polygon references are unique for the navigation mesh, so they are useful for easily identifying a polygon without needing to know which tile it belongs to. </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Despite the name, polygon references can refer to a either a polygon or an off-mesh connection.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">References can become invalid. If they are used after they are invalidated, then methods will return a failure status. Polygon references are based on the tile reference. So they will be invalidated whenever their associated tile reference is invalidated.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Structural changes govern the life of a reference. Changing the configuration of a navigation mesh or the internal structure of a tile will invalidate all associated references.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">References are preserved during tile state changes such as changes flags and areas. They are also preserved during normal runtime loading and unloading of tiles, and during normal serialization/de-serialization of a navigation mesh.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Tile鍜孭olygon鐨勫紩鐢ㄦ柟寮?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">瑕佸畬鍏ㄧ悊瑙avmesh錛屾渶鍚庝竴鐐逛俊鎭槸鍏充簬Tile鍜孭olygon鐨勫紩鐢ㄨ繖涓蹇點(diǎn)傝繖浜涘紩鐢ㄦ槸Navmesh涓烘暟涓嶅鐨勬暟鎹粨鏋勪箣涓錛岃屼笉鏄敱Tile瀹氫箟鐨勩傜悊瑙e紩鐢ㄦ槸浠涔堝緢閲嶈錛屽洜涓洪氳繃瀹冨彲浠ュ疄鐜板綋瀵艱埅緗戞牸鍙戠敓鍙樺寲鐨勬椂鍊欙紝涓浜涚被浼煎璺姛鑳界殑妯″潡鑳借嚜鍔ㄧ殑灝嗗紩鐢ㄧ殑澶氳竟褰㈢疆涓烘棤鏁堛?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鏈川涓婃潵璇達(dá)紝Tile鍜孭olygon鐨勫紩鐢ㄦ槸涓涓猽int32(鏃犵鍙鋒暣鍨?銆俆ile鐨勫紩鐢ㄥ緢灝戣瀹㈡埛浠g爜鐩存帴浣跨敤錛屽洜涓轟嬌鐢ㄥ満鍚堝熀鏈笂閮藉彲浠ヨPolygon浠f浛銆侼avmesh閲岀殑姣忎釜Polygon鐨勫紩鐢ㄩ兘鏄敮涓鐨勶紝鍥犳瀹冧滑鑳藉闈炲父鏂逛究鐨勫畾浣嶅埌鎸囧畾鐨凱olygon錛岃屼笉闇瑕佺煡閬撹繖涓狿olygon灞炰簬鍝釜Tile銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">铏界劧鍚嶅瓧宸埆姣旇緝澶э紝Polygon鐨勫紩鐢ㄦ蹇靛悓鏃朵篃娑電洊浜?jiǎn)off-mesh connections瀵硅薄銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">寮曠敤鍙互鍙樻垚鏃犳晥鐨勩傚鏋滃湪鏃犳晥涔嬪悗榪樹嬌鐢ㄥ紩鐢紝鍑芥暟浼?xì)杩斿洖涓涓け璐ヤ俊鎭侾olygon鐨勫紩鐢ㄦ湁鏁堟ф槸鍩轟簬Tile鐨勫紩鐢ㄧ殑銆傚洜姝ゅ綋Tile鐨勫紩鐢ㄦ棤鏁堜簡(jiǎn)錛屾墍鏈夊睘浜嶵ile鐨凱olygon鐨勫紩鐢ㄤ篃浼?xì)鏃犳晥銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鏋勯犵殑鍙樺寲浼?xì)濯?jiǎng)鍝嶅紩鐢ㄧ殑鐢熷懡鍛ㄦ湡銆傛敼鍙楴avmesh鐨勯厤緗垨鑰匱ile鐨勫唴閮ㄧ粨鏋勪細(xì)寮曡搗鐩稿叧鐨勫紩鐢ㄥ叏閮ㄥけ鏁堛?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">寮曠敤浼?xì)鍦═ile鐨勭姸鎬佸彂鐢熷彉鍖栫殑鏃跺欒繘琛屼繚瀛橈紝姣斿鎸囧畾Area鎴朏lag鍊肩殑鏃跺欍傚湪榪愯鏈熷姩鎬佺殑鍔犺澆鎴栧嵏杞絋ile涔熶細(xì)浣垮紩鐢ㄨ嚜鍔ㄤ繚瀛橈紝榪樻湁褰撴甯鎬覆琛屽寲/鍙嶄覆琛屽寲涓涓狽avmesh鐨勬椂鍊欍?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Creating a Navigation Mesh</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">There are various pipelines for creating a navigation mesh. If you are using Unity, the Unity extensions make it easier. Otherwise, the basic steps are as follows:</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Generate packed tile data:</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Generate PolyMesh and PolyMeshDetail data using NMGen.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Optionally create a ConnectionSet. (Off-mesh connections.)</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Load the data into a NavmeshTileBuildData object.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Create a NavmeshTileData object from the build data.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The tile's structure and default state is now locked into a packed data format that is ready to be loaded into a navigation mesh.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍒涘緩涓涓狽avigation Mesh</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍒涘緩涓涓狽avmesh鏈変竴浜涙祦紼嬨傚鏋滀綘鍦ㄤ嬌鐢║nity錛岄偅涔圕AI鎻愪緵鐨刄nity鎵╁睍浼?xì)璁q欎歡浜嬫儏紼嶅井綆鍗曠偣銆傚惁鍒欙紝鍩烘湰嫻佺▼濡備笅錛?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鐢熸垚鎵撳寘濂界殑Tile鏁版嵁.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">浣跨敤NMGen鐢熸垚PolyMesh鍜孭olyMeshDetail銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍒涘緩涓狢onnectionSet(Off-mesh connections鐨勫鍣?錛岃繖鏄彲閫夌殑銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">灝嗚繖浜涙暟鎹?tile,PolyMesh,PolyMeshDetail,ConnectionSet)鍔犺澆鍒癗avmeshTileBuildData瀵硅薄閲屻?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍒涘緩涓涓狽avmeshTileDatad鏁版嵁銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鐜板湪Tile鐨勬瀯鎴愬叧緋誨拰榛樿鐘舵佸凡緇忛兘灝佽鍒癗avmeshTileData閲屼簡(jiǎn)錛屽茍涓斾負(fù)鐢熸垚Navmesh鑰屽仛浜?jiǎn)鏁版嵁缁撴瀯鐨勬敼鍙樸?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Note Note:</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Using the NavmeshTileBuildData class directly can be a bit daunting. The GetBuildData(BuildContext, Int32, Int32, PolyMeshData, PolyMeshDetailData, ConnectionSet, Boolean) utility method provides a standard way of </span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">creating the build data.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">娉ㄦ剰錛?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鐩存帴浣跨敤NavmeshTileBuildData綾誨彲鑳芥湁鐐歸毦鎼炪侴etBuildData榪欎釜宸ュ叿鍑芥暟鎻愪緵浜?jiǎn)涓縐嶆爣鍑嗘祦紼嬨?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Create a navigation mesh:</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Single tile navigation meshes are created using the the single step Create(NavmeshTileBuildData, Navmesh) method.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Multi-tile navigation meshes are created then loaded using multiple methods. Use the Create(NavmeshParams, Navmesh) method to initialize an empty mesh. then add tile data using the AddTile(NavmeshTileData, UInt32, UInt32) method.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍒涘緩涓涓狽avmesh</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">濡傛灉鍒涘緩鍙湁涓猅ile鐨凬avmesh,鍙渶瑕佽皟鐢ㄤ竴嬈reate(銆怤avmeshTileBuildData銆? Navmesh)鍑芥暟銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">鍒涘緩澶歍ile鐨凬avmesh闇瑕佸嬈¤皟鐢ㄥ嚱鏁般備嬌鐢–reate(銆怤avmeshParams銆? Navmesh)鍑芥暟鍒涘緩涓涓┖鐨刵avmesh,鐒跺悗浣跨敤AddTile鍑芥暟灝員ile娣誨姞榪涘幓(1)銆?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Navigation Mesh Serialization</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">The Navmesh class supports byte serialization using the GetSerializedMesh() method. This saves the entire mesh.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">It is possible to serialize state separately from structure on a tile-by-tile basis. Get the tile from the mesh using the GetTile(Int32) method, then use the GetState(Byte[]) and SetState(Byte[]) methods.</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Navmesh鐨勪覆琛屽寲</span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">Namvesh綾繪敮鎸佷簩榪涘埗涓茶鍖栵紝浣跨敤GetSerializedMesh鏉ュ畬鎴愩傝繖浼?xì)灏嗘暣涓猰esh杞垚浜岃繘鍒舵暟鎹?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">瀹冨彲浠ユ瘡Tile鐨勩佺姸鎬佸拰鎷撴墤緇撴瀯鍒嗙鐨勮繘琛屼覆琛屽寲銆備粠mesh閲屽彇Tile浣跨敤GetTile(Int32)鍑芥暟錛岀劧鍚庝嬌鐢℅etState(Byte[])鍑芥暟鍜孲etState(Byte[])鍑芥暟榪涜鐘舵佺殑璧嬪箋?/span><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><br style="color: #333333; font-family: Arial; background-color: #ffffff;" /><span style="color: #333333; font-family: Arial; background-color: #ffffff;">(1)Tile鏁版嵁鏈夎嚜宸辯殑鐢熸垚嫻佺▼錛屽彲浠ュ弬鑰傾n Introduction to NMGen</span><img src ="http://www.shnenglu.com/ming81/aggbug/214394.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ming81/" target="_blank">鐐圭偣婊存淮</a> 2016-11-08 21:14 <a href="http://www.shnenglu.com/ming81/archive/2016/11/08/214394.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>(鎼繍宸?CritterAI瀹樻柟鏂囨。緲昏瘧銆怉n Introduction to Navigation銆?http://www.shnenglu.com/ming81/archive/2016/11/08/214393.html鐐圭偣婊存淮鐐圭偣婊存淮Tue, 08 Nov 2016 13:13:00 GMThttp://www.shnenglu.com/ming81/archive/2016/11/08/214393.html緲昏瘧錛歬un 2014.12.4 


The navigation side of CAINav consists of features used to create and use navigation meshes for pathfinding and local steering.
CAINav鎻愪緵鍒涘緩Navmesh銆佸熀浜嶯avmesh鐨勫璺拰灞閮ㄨ漿鍚戦伩闅溿?br />

Core: org.critterai.nav
Unity extensions: org.critterai.nav.u3d
鏍稿績(jī)鍛藉悕絀洪棿錛歰rg.critterai.nav
Unity鎵╁睍錛歰rg.critterai.nav.u3d




There are five main classes you'll be dealing with:
緇忓父鍜屼綘鎵撲氦閬撶殑綾繪湁浜斾釜錛?br />

Note Note:
CAINav uses the OpenGL coordinate system.
娉ㄦ剰錛?br />CAINav浣跨敤OpenGL鍧愭爣緋匯?br />

The Navmesh class defines the structure and state of the navigation mesh. The only user component that deals directly with this class on a regular basis is the component responsible for creating the mesh and managing its state. Normal navigation clients, the one's needing to perform pathfinding and such, rarely if ever interact directly with the navigation mesh.
銆怤avmesh銆戠被瀹氫箟浜?jiǎn)瀵艰埅缃戞牸鐨勬暟鎹l撴瀯鍜岀姸鎬併傝繖涓被鐢ㄤ簬淇濆瓨鐢ㄦ埛鍒涘緩鐨勫鑸綉鏍兼暟鎹拰鏁版嵁鐘舵併傞渶瑕佷嬌鐢ㄥ鑸殑鍦版柟涓鑸槸榪涜瀵昏礬鎿嶄綔錛屽伓灝?dāng)涔熷彲浠ヤ娇鐢╪avmesh榪涜涓浜涗氦浜掋?br />

The most important class to understand and become comfortable with is the NavmeshQuery class. It provides almost all of the client navigation features, including A* and Dijkstra path searches, string pulling, point and polygon searches, raycasting, etc.
銆怤avmeshQuery銆戠被鏄渶瑕佺悊瑙i忓交鐨勬渶閲嶈鐨勭被銆傚畠鎻愪緵浜?jiǎn)鎵鏈夌敤鎴風(fēng)駭鐨勫鑸姛鑳斤紝鍖呮嫭浣跨敤A*綆楁硶鍜孌ijkstra綆楁硶榪涜瀵昏礬銆佺懷绱㈢壍寮曘佹悳绱㈢偣鍜屽杈瑰艦銆佸皠綰挎煡璇㈢瓑絳夈?br />

The NavmeshQueryFilter is a seemingly minor class, but it has a large impact on navigation. Filters are used to define the costs of traversing the mesh and flags that control which parts of the navigation mesh are included in operations. Multiple filters can be used to customize the navigation behavior on a per client basis.
銆怤avmeshQueryFilter銆戞槸涓涓湅璧鋒潵寰堝皬鐨勭被錛屼絾鏄畠瀵瑰鑸殑褰卞搷寰堝ぇ銆傝繃婊ゅ櫒鐢ㄦ潵瀹氫箟絀胯繃鏌愪釜鍖哄煙鏃剁殑浠d環(huán)銆傚彲浠ヤ嬌鐢ㄥ涓繃婊ゅ櫒鏉ュ疄鐜拌嚜瀹氫箟鐨勫鑸涓恒?br />

The PathCorridor class provides a way of moving along a navigation path without worrying about the minutiae of managing the path.
銆怭athCorridor銆戠被鎻愪緵浜?jiǎn)涓縐嶆部瀵艱埅璺緞錛岃屼笉蹇呮媴蹇?jī)绠$悊璧\寰勭殑緇嗚妭(1)銆?br />

The CrowdManager is the big beast of the navigation classes. It not only handles a lot of the path management for you, but also local steering and dynamic avoidance between navigation clients. I.e. It can keep your agents from running into each other.
銆怌rowdManager銆戠被鏄崄鍒嗗簽鏉傜殑涓涓被銆傚畠涓嶄粎涓轟綘澶勭悊浜?jiǎn)闈炲父澶氱殑璧\寰勭鐞嗙浉鍏崇殑浜嬫儏錛屽悓鏃朵篃澶勭悊涓浜涘眬閮ㄩ伩闅滃拰閬垮紑鍏跺畠瀵昏礬浠g悊瀵硅薄銆備篃灝辨槸璇達(dá)紝浠栧彲浠ヨ鎵鏈夌殑浠g悊瀵硅薄涓嶄細(xì)鐩鎬簰絀挎彃銆?br />

(1)闇瑕佸疄楠屻?nbsp;

]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            亚洲国产高清自拍| 久久国产欧美精品| 一本一本久久a久久精品牛牛影视| 亚洲免费视频观看| 亚洲欧洲综合另类| 久久久噜噜噜久久中文字免| 国产精品久久久久久五月尺| 日韩亚洲欧美一区| 亚洲福利免费| 欧美成年人在线观看| 一区二区在线观看视频| 免费看av成人| 欧美日韩另类视频| 国产毛片一区二区| 亚洲国产日韩在线| 亚洲视频1区| 欧美在线视频观看| 欧美高清视频一二三区| 一本一本久久a久久精品牛牛影视| 亚洲午夜精品网| 久久免费精品视频| 国产精品白丝jk黑袜喷水| 国产一区清纯| 99精品欧美一区二区三区 | 黄色成人在线观看| 亚洲国产精品美女| 亚洲欧美日韩国产成人| 久久在线免费| 99国产精品国产精品久久| 午夜精品亚洲一区二区三区嫩草| 久久久www成人免费毛片麻豆| 欧美精品在欧美一区二区少妇| 国产精品一区在线观看| 亚洲精选在线观看| 久久人人爽爽爽人久久久| 亚洲免费观看在线观看| 久久综合一区| 亚洲在线网站| 欧美日韩精品免费| 亚洲精品视频中文字幕| 美女任你摸久久| 校园激情久久| 国产女精品视频网站免费| 夜夜嗨av一区二区三区四区| 免费观看久久久4p| 久久国产婷婷国产香蕉| 国产欧美在线播放| 小嫩嫩精品导航| 亚洲午夜精品一区二区三区他趣 | 国内精品久久久久久久果冻传媒| 99在线精品视频| 欧美激情亚洲一区| 欧美日韩在线播放三区四区| 欧美3dxxxxhd| 欧美一区二区播放| 日韩午夜三级在线| 欧美成人免费全部观看天天性色| 激情丁香综合| 久久久国产精品一区二区中文| 国产精品99久久久久久宅男 | 久久久久九九九| 国产精品一区=区| 亚洲欧美日韩在线| 一区二区三区不卡视频在线观看| 欧美黄免费看| 亚洲伦伦在线| 99v久久综合狠狠综合久久| 欧美日韩1区2区3区| 亚洲天堂av在线免费| 99re6这里只有精品| 欧美天天视频| 欧美亚洲免费| 久久精品91| 亚洲国产日韩欧美在线图片| 亚洲第一在线视频| 欧美日本亚洲韩国国产| 在线观看日韩av先锋影音电影院| 久久久欧美精品sm网站| 久久精品一区二区| 亚洲日本欧美| 亚洲自拍16p| 亚洲电影有码| 一区二区三区国产精华| 国产亚洲综合在线| 欧美激情在线有限公司| 欧美日韩在线综合| 久久久噜噜噜久噜久久| 久久先锋影音| 亚洲婷婷国产精品电影人久久| 亚洲小说欧美另类社区| 在线播放豆国产99亚洲| 亚洲伦理在线观看| 国产欧美日本一区视频| 欧美**字幕| 欧美亚洲不卡| 欧美大学生性色视频| 国产精品超碰97尤物18| 久久精品一区| 欧美另类极品videosbest最新版本| 亚洲女女做受ⅹxx高潮| 久久久噜噜噜久噜久久| 亚洲女人天堂av| 免费视频久久| 久久精品国产77777蜜臀| 欧美国产三级| 美女尤物久久精品| 国产欧美日韩亚州综合| 日韩一级精品| 亚洲欧洲另类| 久久精品首页| 欧美一区二区免费视频| 欧美激情亚洲| 好吊妞这里只有精品| 亚洲色在线视频| 久久国产主播| 欧美一区二区| 欧美午夜精品| 亚洲精品1区2区| 在线观看日韩av| 久久成人av少妇免费| 午夜精品久久久久| 欧美三级电影精品| 亚洲激情不卡| 亚洲国产欧美在线人成| 欧美资源在线| 性高湖久久久久久久久| 欧美日韩国产精品自在自线| 欧美二区在线看| 亚洲国产精品999| 欧美专区中文字幕| 久久视频在线视频| 韩国一区二区三区在线观看| 亚洲女优在线| 欧美伊人久久久久久久久影院 | 欧美另类videos死尸| 欧美黄色小视频| 亚洲国产精品久久久久秋霞蜜臀 | 91久久精品国产| 亚洲国产成人在线播放| 噜噜噜91成人网| 亚洲国产天堂网精品网站| 亚洲精品国产无天堂网2021| 欧美大片在线看| 亚洲九九精品| 亚洲欧美日韩精品久久久| 欧美私人啪啪vps| 亚洲一区二区三区在线播放| 欧美一级黄色录像| 国产无一区二区| 久久久久久久久综合| 欧美电影电视剧在线观看| 亚洲精品社区| 国产精品白丝黑袜喷水久久久| 亚洲欧美网站| 欧美福利电影网| 亚洲在线一区二区三区| 国产欧美一区二区三区沐欲| 久久爱www.| 亚洲第一搞黄网站| 在线视频欧美精品| 国产一区二区毛片| 欧美福利精品| 亚洲欧美日韩中文在线制服| 免费观看成人www动漫视频| av成人动漫| 国内外成人在线| 欧美日韩成人在线观看| 性一交一乱一区二区洋洋av| 亚洲电影中文字幕| 久久国产精品久久久久久| 亚洲第一在线| 国产嫩草一区二区三区在线观看| 久久久午夜电影| 在线午夜精品自拍| 免费不卡在线视频| 亚洲影院在线观看| 欧美一区二区三区啪啪| 韩日午夜在线资源一区二区| 国产精品久久久久久模特| 欧美午夜电影在线| 欧美性久久久| 亚洲国产三级在线| 欧美一区日本一区韩国一区| 亚洲二区视频在线| 国产精品一区二区三区久久| 欧美高清日韩| 久久久久99| 欧美在线视频一区二区三区| 一本久久综合亚洲鲁鲁| 欧美激情精品久久久久久大尺度| 欧美一区二区视频观看视频| 一本到12不卡视频在线dvd| 狠狠色综合播放一区二区| 国产精品成人一区二区艾草| 欧美大片第1页| 久久全球大尺度高清视频| 亚洲一区二区av电影| 99在线精品免费视频九九视| 亚洲福利国产| 欧美顶级艳妇交换群宴|