{"id":103300,"date":"2026-09-10T08:49:17","date_gmt":"2026-09-10T00:49:17","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/103300.html"},"modified":"2026-09-10T08:49:17","modified_gmt":"2026-09-10T00:49:17","slug":"6%e3%80%81%e8%be%93%e5%85%a5%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/103300.html","title":{"rendered":"6\u3001\u8f93\u5165\u7cfb\u7edf"},"content":{"rendered":"<h2>\u7b2c6\u7ae0 \u8f93\u5165\u7cfb\u7edf<\/h2>\n<h3>6.1 Input Map \u914d\u7f6e<\/h3>\n<p>Input Map \u662f Godot \u7684\u8f93\u5165\u6620\u5c04\u7cfb\u7edf&#xff0c;\u5c06\u7269\u7406\u8f93\u5165&#xff08;\u6309\u952e\/\u624b\u67c4\u6309\u94ae&#xff09;\u6620\u5c04\u4e3a\u903b\u8f91\u52a8\u4f5c\u3002<\/p>\n<h4>\u8bbe\u7f6e\u6b65\u9aa4<\/h4>\n<p>\u9879\u76ee \u2192 \u9879\u76ee\u8bbe\u7f6e \u2192 \u8f93\u5165\u6620\u5c04 (Input Map)<\/p>\n<p>\u6dfb\u52a0\u52a8\u4f5c&#xff1a;<br \/>\n1. \u8f93\u5165\u52a8\u4f5c\u540d\u79f0&#xff08;\u5982 &#034;jump&#034;&#xff09;\u2192 \u70b9\u51fb&#034;\u6dfb\u52a0&#034;<br \/>\n2. \u70b9\u51fb\u52a8\u4f5c\u65c1\u8fb9\u7684 &#034;&#043;&#034; \u6309\u94ae<br \/>\n3. \u6309\u4e0b\u8981\u7ed1\u5b9a\u7684\u6309\u952e&#xff08;\u5982\u7a7a\u683c\u952e&#xff09;<br \/>\n4. \u53ef\u4ee5\u7ed1\u5b9a\u591a\u4e2a\u6309\u952e\u5230\u540c\u4e00\u4e2a\u52a8\u4f5c<\/p>\n<h4>\u63a8\u8350\u7684\u52a8\u4f5c\u547d\u540d<\/h4>\n<p>\u79fb\u52a8\u7c7b&#xff1a;<br \/>\n&#8211; move_left    (A\u952e \/ \u5de6\u7bad\u5934 \/ \u5de6\u6447\u6746)<br \/>\n&#8211; move_right   (D\u952e \/ \u53f3\u7bad\u5934 \/ \u5de6\u6447\u6746)<br \/>\n&#8211; move_up      (W\u952e \/ \u4e0a\u7bad\u5934 \/ \u5de6\u6447\u6746)<br \/>\n&#8211; move_down    (S\u952e \/ \u4e0b\u7bad\u5934 \/ \u5de6\u6447\u6746)<\/p>\n<p>\u52a8\u4f5c\u7c7b&#xff1a;<br \/>\n&#8211; jump         (\u7a7a\u683c\u952e \/ \u624b\u67c4A)<br \/>\n&#8211; attack       (J\u952e \/ \u624b\u67c4X)<br \/>\n&#8211; dash         (Shift\u952e \/ \u624b\u67c4B)<br \/>\n&#8211; interact     (E\u952e \/ \u624b\u67c4Y)<\/p>\n<p>UI\u7c7b&#xff1a;<br \/>\n&#8211; ui_accept    (\u56de\u8f66 \/ \u624b\u67c4A)  \u2190 Godot \u5185\u7f6e<br \/>\n&#8211; ui_cancel    (Esc \/ \u624b\u67c4B)   \u2190 Godot \u5185\u7f6e<br \/>\n&#8211; pause        (Esc \/ \u5f00\u59cb\u952e)<\/p>\n<h3>6.2 Input \u5355\u4f8b<\/h3>\n<p># \u68c0\u67e5\u8f93\u5165\u72b6\u6001&#xff08;\u5728 _process \u6216 _physics_process \u4e2d\u4f7f\u7528&#xff09;<\/p>\n<p># \u662f\u5426\u6b63\u5728\u6309\u4e0b<br \/>\nif Input.is_action_pressed(&#034;move_right&#034;):<br \/>\n    velocity.x &#043;&#061; speed<\/p>\n<p># \u662f\u5426\u521a\u521a\u6309\u4e0b&#xff08;\u53ea\u89e6\u53d1\u4e00\u6b21&#xff09;<br \/>\nif Input.is_action_just_pressed(&#034;jump&#034;):<br \/>\n    jump()<\/p>\n<p># \u662f\u5426\u521a\u521a\u677e\u5f00<br \/>\nif Input.is_action_just_released(&#034;jump&#034;):<br \/>\n    # \u53ef\u53d8\u8df3\u8dc3\u9ad8\u5ea6&#xff1a;\u677e\u5f00\u8df3\u8dc3\u952e\u65f6\u622a\u65ad\u4e0a\u5347\u901f\u5ea6<br \/>\n    if velocity.y &lt; 0:<br \/>\n        velocity.y *&#061; 0.5<\/p>\n<p># \u83b7\u53d6\u8f74\u503c&#xff08;-1 \u5230 1&#xff09;<br \/>\nvar horizontal: float &#061; Input.get_axis(&#034;move_left&#034;, &#034;move_right&#034;)<br \/>\nvar vertical: float &#061; Input.get_axis(&#034;move_up&#034;, &#034;move_down&#034;)<\/p>\n<p># \u83b7\u53d6\u65b9\u5411\u5411\u91cf&#xff08;\u6807\u51c6\u5316&#xff09;<br \/>\nvar direction: Vector2 &#061; Input.get_vector(&#034;move_left&#034;, &#034;move_right&#034;, &#034;move_up&#034;, &#034;move_down&#034;)<br \/>\n# \u8fd4\u56de\u503c\u5df2\u7ecf\u662f\u6807\u51c6\u5316\u7684&#xff0c;\u5bf9\u89d2\u7ebf\u4e0d\u4f1a\u66f4\u5feb<\/p>\n<h3>6.3 \u8f93\u5165\u4f20\u64ad\u94fe<\/h3>\n<p>1. Engine \u63a5\u6536\u539f\u59cb\u8f93\u5165\u4e8b\u4ef6<br \/>\n       \u2193<br \/>\n2. _input(event)         \u2190 \u573a\u666f\u6811\u4e2d\u6240\u6709\u8282\u70b9\u90fd\u80fd\u6536\u5230<br \/>\n       \u2193<br \/>\n3. Control._gui_input()  \u2190 UI \u63a7\u4ef6\u5c1d\u8bd5\u5904\u7406&#xff08;\u9f20\u6807\u70b9\u51fb\u6309\u94ae\u7b49&#xff09;<br \/>\n       \u2193 &#xff08;\u5982\u679c UI \u6ca1\u6709\u6d88\u8d39\u8fd9\u4e2a\u4e8b\u4ef6&#xff09;<br \/>\n4. _unhandled_input()    \u2190 \u6ca1\u6709\u88ab UI \u6d88\u8d39\u7684\u4e8b\u4ef6<br \/>\n       \u2193<br \/>\n5. _unhandled_key_input() \u2190 \u4e13\u95e8\u5904\u7406\u952e\u76d8\u4e8b\u4ef6<\/p>\n<h4>\u4e3a\u4ec0\u4e48\u9700\u8981\u8fd9\u4e2a\u673a\u5236&#xff1f;<\/h4>\n<p># \u573a\u666f&#xff1a;\u73a9\u5bb6\u70b9\u51fb\u4e86\u6682\u505c\u6309\u94ae<br \/>\n# &#8211; UI \u6309\u94ae\u7684 _gui_input \u6d88\u8d39\u4e86\u70b9\u51fb\u4e8b\u4ef6<br \/>\n# &#8211; \u6e38\u620f\u573a\u666f\u7684 _unhandled_input \u4e0d\u4f1a\u6536\u5230\u8fd9\u4e2a\u70b9\u51fb<br \/>\n# &#8211; \u8fd9\u6837\u5c31\u4e0d\u4f1a\u5728\u70b9\u6309\u94ae\u7684\u540c\u65f6\u89e6\u53d1\u6e38\u620f\u4e2d\u7684\u70b9\u51fb\u64cd\u4f5c<\/p>\n<p># \u63a8\u8350&#xff1a;\u6e38\u620f\u903b\u8f91\u653e\u5728 _unhandled_input \u4e2d<br \/>\nfunc _unhandled_input(event: InputEvent) -&gt; void:<br \/>\n    # \u8fd9\u91cc\u5904\u7406\u6e38\u620f\u8f93\u5165&#xff08;\u4e0d\u4f1a\u88ab UI \u5e72\u6270&#xff09;<br \/>\n    if event.is_action_pressed(&#034;attack&#034;):<br \/>\n        attack()<br \/>\n    if event.is_action_pressed(&#034;jump&#034;):<br \/>\n        jump()<\/p>\n<h3>6.4 VirtualJoystick&#xff08;4.7 \u65b0\u589e&#xff09;<\/h3>\n<p>Godot 4.7 \u5185\u7f6e\u4e86 VirtualJoystick \u8282\u70b9&#xff0c;\u65e0\u9700\u7b2c\u4e09\u65b9\u63d2\u4ef6\u3002<\/p>\n<h4>\u8bbe\u7f6e<\/h4>\n<p>\u6dfb\u52a0\u8282\u70b9 \u2192 VirtualJoystick<br \/>\n\u5c5e\u6027\u914d\u7f6e&#xff1a;<br \/>\n&#8211; texture_base: \u5e95\u76d8\u56fe\u7247<br \/>\n&#8211; texture_tip: \u6447\u6746\u56fe\u7247<br \/>\n&#8211; action_left: \u5de6\u52a8\u4f5c\u540d<br \/>\n&#8211; action_right: \u53f3\u52a8\u4f5c\u540d<br \/>\n&#8211; action_up: \u4e0a\u52a8\u4f5c\u540d<br \/>\n&#8211; action_down: \u4e0b\u52a8\u4f5c\u540d<br \/>\n&#8211; mode: Fixed \/ Dynamic \/ Following<\/p>\n<h4>\u4ee3\u7801\u4f7f\u7528<\/h4>\n<p>extends Node2D<\/p>\n<p># VirtualJoystick \u81ea\u52a8\u5c06\u8f93\u5165\u6620\u5c04\u5230\u6307\u5b9a\u7684\u52a8\u4f5c<br \/>\n# \u4e4b\u540e\u4f7f\u7528 Input.get_axis() \/ Input.get_vector() \u83b7\u53d6\u8f93\u5165<br \/>\n# \u4e0e\u952e\u76d8\/\u624b\u67c4\u8f93\u5165\u5b8c\u5168\u4e00\u81f4<\/p>\n<p>func _physics_process(delta: float) -&gt; void:<br \/>\n    # \u8fd9\u6bb5\u4ee3\u7801\u540c\u65f6\u652f\u6301\u952e\u76d8\u3001\u624b\u67c4\u548c\u865a\u62df\u6447\u6746<br \/>\n    var direction :&#061; Input.get_vector(&#034;move_left&#034;, &#034;move_right&#034;, &#034;move_up&#034;, &#034;move_down&#034;)<br \/>\n    velocity &#061; direction * speed<br \/>\n    move_and_slide()<\/p>\n<h3>6.5 \u9f20\u6807\u8f93\u5165<\/h3>\n<p>func _unhandled_input(event: InputEvent) -&gt; void:<br \/>\n    # \u9f20\u6807\u79fb\u52a8<br \/>\n    if event is InputEventMouseMotion:<br \/>\n        var mouse_pos: Vector2 &#061; event.position<br \/>\n        var relative: Vector2 &#061; event.relative  # \u9f20\u6807\u79fb\u52a8\u589e\u91cf<br \/>\n        look_at(mouse_pos)<\/p>\n<p>    # \u9f20\u6807\u6309\u94ae<br \/>\n    if event is InputEventMouseButton:<br \/>\n        if event.button_index &#061;&#061; MOUSE_BUTTON_LEFT and event.pressed:<br \/>\n            shoot()<br \/>\n        if event.button_index &#061;&#061; MOUSE_BUTTON_RIGHT and event.pressed:<br \/>\n            secondary_attack()<br \/>\n        # \u6eda\u8f6e<br \/>\n        if event.button_index &#061;&#061; MOUSE_BUTTON_WHEEL_UP:<br \/>\n            zoom_in()<br \/>\n        if event.button_index &#061;&#061; MOUSE_BUTTON_WHEEL_DOWN:<br \/>\n            zoom_out()<\/p>\n<p># \u83b7\u53d6\u9f20\u6807\u5168\u5c40\u4f4d\u7f6e<br \/>\nfunc _process(delta: float) -&gt; void:<br \/>\n    var mouse_pos :&#061; get_global_mouse_position()<br \/>\n    crosshair.position &#061; mouse_pos<\/p>\n<h3>6.6 \u5e73\u53f0\u5dee\u5f02\u5316\u8f93\u5165\u7b56\u7565<\/h3>\n<p># \u68c0\u6d4b\u5f53\u524d\u8f93\u5165\u7c7b\u578b<br \/>\nfunc get_input_type() -&gt; String:<br \/>\n    # \u53ef\u4ee5\u901a\u8fc7\u6700\u540e\u8f93\u5165\u7684\u4e8b\u4ef6\u7c7b\u578b\u5224\u65ad<br \/>\n    return &#034;keyboard&#034;  # \u6216 &#034;touch&#034; \u6216 &#034;gamepad&#034;<\/p>\n<p># \u68c0\u6d4b\u5e73\u53f0<br \/>\nfunc is_mobile() -&gt; bool:<br \/>\n    return OS.get_name() in [&#034;Android&#034;, &#034;iOS&#034;]<\/p>\n<p># \u6839\u636e\u5e73\u53f0\u663e\u793a\u4e0d\u540c\u63d0\u793a<br \/>\nfunc show_control_hints() -&gt; void:<br \/>\n    if is_mobile():<br \/>\n        $TouchControls.visible &#061; true<br \/>\n        $KeyboardHints.visible &#061; false<br \/>\n    else:<br \/>\n        $TouchControls.visible &#061; false<br \/>\n        $KeyboardHints.visible &#061; true<\/p>\n<h3>6.7 \u8f93\u5165\u7f13\u51b2\u4e0e\u8fde\u62db<\/h3>\n<p># \u8f93\u5165\u7f13\u51b2&#xff1a;\u5728\u89d2\u8272\u8fd8\u672a\u51c6\u5907\u597d\u65f6\u7f13\u5b58\u8f93\u5165&#xff0c;\u51c6\u5907\u597d\u540e\u7acb\u5373\u6267\u884c<br \/>\n# \u8fd9\u6837\u73a9\u5bb6\u4e0d\u9700\u8981\u7cbe\u786e\u65f6\u673a&#xff0c;\u624b\u611f\u66f4\u597d<\/p>\n<p>var input_buffer: Array[String] &#061; []<br \/>\nconst BUFFER_TIME: float &#061; 0.15  # 150ms \u7f13\u51b2\u7a97\u53e3<br \/>\nvar buffer_timers: Dictionary &#061; {}<\/p>\n<p>func _unhandled_input(event: InputEvent) -&gt; void:<br \/>\n    if event.is_action_pressed(&#034;attack&#034;):<br \/>\n        buffer_action(&#034;attack&#034;)<br \/>\n    if event.is_action_pressed(&#034;jump&#034;):<br \/>\n        buffer_action(&#034;jump&#034;)<\/p>\n<p>func buffer_action(action: String) -&gt; void:<br \/>\n    input_buffer.append(action)<br \/>\n    buffer_timers[action] &#061; BUFFER_TIME<\/p>\n<p>func _process(delta: float) -&gt; void:<br \/>\n    # \u66f4\u65b0\u7f13\u51b2\u8ba1\u65f6\u5668<br \/>\n    var expired: Array[String] &#061; []<br \/>\n    for action in buffer_timers:<br \/>\n        buffer_timers[action] -&#061; delta<br \/>\n        if buffer_timers[action] &lt;&#061; 0:<br \/>\n            expired.append(action)<br \/>\n    for action in expired:<br \/>\n        buffer_timers.erase(action)<br \/>\n        input_buffer.erase(action)<\/p>\n<p>func has_buffered(action: String) -&gt; bool:<br \/>\n    return action in input_buffer<\/p>\n<p>func consume_buffer(action: String) -&gt; void:<br \/>\n    input_buffer.erase(action)<br \/>\n    buffer_timers.erase(action)<\/p>\n<p># \u4f7f\u7528&#xff1a;\u5728\u72b6\u6001\u673a\u8f6c\u6362\u65f6\u68c0\u67e5\u7f13\u51b2<br \/>\nfunc _on_attack_finished() -&gt; void:<br \/>\n    if has_buffered(&#034;attack&#034;):<br \/>\n        consume_buffer(&#034;attack&#034;)<br \/>\n        attack()  # \u7acb\u5373\u6267\u884c\u7f13\u51b2\u7684\u653b\u51fb<br \/>\n    else:<br \/>\n        state_machine.travel(&#034;idle&#034;)<\/p>\n<h3>6.8 \u8fd0\u884c\u65f6\u91cd\u6620\u5c04\u6309\u952e<\/h3>\n<p># \u4fdd\u5b58\u81ea\u5b9a\u4e49\u6309\u952e\u6620\u5c04<br \/>\nfunc save_key_bindings() -&gt; void:<br \/>\n    var config :&#061; ConfigFile.new()<\/p>\n<p>    for action in InputMap.get_actions():<br \/>\n        var events :&#061; InputMap.action_get_events(action)<br \/>\n        if not events.is_empty():<br \/>\n            config.set_value(&#034;keybindings&#034;, action, events[0])<\/p>\n<p>    config.save(&#034;user:\/\/keybindings.cfg&#034;)<\/p>\n<p># \u52a0\u8f7d\u81ea\u5b9a\u4e49\u6309\u952e\u6620\u5c04<br \/>\nfunc load_key_bindings() -&gt; void:<br \/>\n    var config :&#061; ConfigFile.new()<br \/>\n    if config.load(&#034;user:\/\/keybindings.cfg&#034;) !&#061; OK:<br \/>\n        return<\/p>\n<p>    for action in config.get_section_keys(&#034;keybindings&#034;):<br \/>\n        var event: InputEvent &#061; config.get_value(&#034;keybindings&#034;, action)<br \/>\n        InputMap.action_erase_events(action)<br \/>\n        InputMap.action_add_event(action, event)<\/p>\n<p># \u91cd\u65b0\u7ed1\u5b9a\u6309\u952e<br \/>\nfunc rebind_action(action: String, new_event: InputEvent) -&gt; void:<br \/>\n    InputMap.action_erase_events(action)<br \/>\n    InputMap.action_add_event(action, new_event)<\/p>\n<h3>\u5b9e\u64cd\u7ec3\u4e60<\/h3>\n<h4>\u7ec3\u4e60&#xff1a;\u5b8c\u6574\u8f93\u5165\u7ba1\u7406\u5668<\/h4>\n<p># input_manager.gd &#8211; Autoload<br \/>\nextends Node<\/p>\n<p>signal input_device_changed(device_type: String)<\/p>\n<p>enum DeviceType { KEYBOARD, GAMEPAD, TOUCH }<br \/>\nvar current_device: DeviceType &#061; DeviceType.KEYBOARD<\/p>\n<p>func _input(event: InputEvent) -&gt; void:<br \/>\n    if event is InputEventKey or event is InputEventMouse:<br \/>\n        if current_device !&#061; DeviceType.KEYBOARD:<br \/>\n            current_device &#061; DeviceType.KEYBOARD<br \/>\n            input_device_changed.emit(&#034;keyboard&#034;)<br \/>\n    elif event is InputEventJoypadButton or event is InputEventJoypadMotion:<br \/>\n        if current_device !&#061; DeviceType.GAMEPAD:<br \/>\n            current_device &#061; DeviceType.GAMEPAD<br \/>\n            input_device_changed.emit(&#034;gamepad&#034;)<\/p>\n<p>func get_action_hint(action: String) -&gt; String:<br \/>\n    match current_device:<br \/>\n        DeviceType.KEYBOARD:<br \/>\n            return get_key_name(action)<br \/>\n        DeviceType.GAMEPAD:<br \/>\n            return get_gamepad_button_name(action)<br \/>\n        _:<br \/>\n            return action<\/p>\n<p>func get_key_name(action: String) -&gt; String:<br \/>\n    var events :&#061; InputMap.action_get_events(action)<br \/>\n    for event in events:<br \/>\n        if event is InputEventKey:<br \/>\n            return OS.get_keycode_string(event.keycode)<br \/>\n    return &#034;?&#034;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c6\u7ae0 \u8f93\u5165\u7cfb\u7edf<br \/>\n6.1 Input Map \u914d\u7f6e<br \/>\nInput Map \u662f Godot \u7684\u8f93\u5165\u6620\u5c04\u7cfb\u7edf&#xff0c;\u5c06\u7269\u7406\u8f93\u5165&#xff08;\u6309\u952e\/\u624b\u67c4\u6309\u94ae&#xff09;\u6620\u5c04\u4e3a\u903b\u8f91\u52a8\u4f5c\u3002<br \/>\n\u8bbe\u7f6e\u6b65\u9aa4<br \/>\n\u9879\u76ee \u2192 \u9879\u76ee\u8bbe\u7f6e \u2192 \u8f93\u5165\u6620\u5c04 (Input Map)\u6dfb\u52a0\u52a8\u4f5c&#xff1a;<br \/>\n1. \u8f93\u5165\u52a8\u4f5c\u540d\u79f0&#xff08;\u5982 \\&#8221;jump\\&#8221;&#xff09;\u2192 \u70b9\u51fb\\&#8221;\u6dfb\u52a0\\&#8221;<br \/>\n2. \u70b9\u51fb\u52a8\u4f5c\u65c1\u8fb9\u7684 \\&#8221;\\&#8221; \u6309\u94ae<br \/>\n3. \u6309\u4e0b\u8981\u7ed1\u5b9a\u7684\u6309\u952e&#xff08;\u5982\u7a7a\u683c\u952e&#xff09;<br \/>\n4. \u53ef\u4ee5\u7ed1\u5b9a<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[8459,11653,735],"topic":[],"class_list":["post-103300","post","type-post","status-publish","format-standard","hentry","category-server","tag-godot","tag-11653","tag-735"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>6\u3001\u8f93\u5165\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/103300.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"6\u3001\u8f93\u5165\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u7b2c6\u7ae0 \u8f93\u5165\u7cfb\u7edf 6.1 Input Map \u914d\u7f6e Input Map \u662f Godot \u7684\u8f93\u5165\u6620\u5c04\u7cfb\u7edf&#xff0c;\u5c06\u7269\u7406\u8f93\u5165&#xff08;\u6309\u952e\/\u624b\u67c4\u6309\u94ae&#xff09;\u6620\u5c04\u4e3a\u903b\u8f91\u52a8\u4f5c\u3002 \u8bbe\u7f6e\u6b65\u9aa4 \u9879\u76ee \u2192 \u9879\u76ee\u8bbe\u7f6e \u2192 \u8f93\u5165\u6620\u5c04 (Input Map)\u6dfb\u52a0\u52a8\u4f5c&#xff1a; 1. \u8f93\u5165\u52a8\u4f5c\u540d\u79f0&#xff08;\u5982 &quot;jump&quot;&#xff09;\u2192 \u70b9\u51fb&quot;\u6dfb\u52a0&quot; 2. \u70b9\u51fb\u52a8\u4f5c\u65c1\u8fb9\u7684 &quot;&quot; \u6309\u94ae 3. \u6309\u4e0b\u8981\u7ed1\u5b9a\u7684\u6309\u952e&#xff08;\u5982\u7a7a\u683c\u952e&#xff09; 4. \u53ef\u4ee5\u7ed1\u5b9a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/103300.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-10T00:49:17+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/103300.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/103300.html\",\"name\":\"6\u3001\u8f93\u5165\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-10T00:49:17+00:00\",\"dateModified\":\"2026-09-10T00:49:17+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/103300.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/103300.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/103300.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"6\u3001\u8f93\u5165\u7cfb\u7edf\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"6\u3001\u8f93\u5165\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/103300.html","og_locale":"zh_CN","og_type":"article","og_title":"6\u3001\u8f93\u5165\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u7b2c6\u7ae0 \u8f93\u5165\u7cfb\u7edf 6.1 Input Map \u914d\u7f6e Input Map \u662f Godot \u7684\u8f93\u5165\u6620\u5c04\u7cfb\u7edf&#xff0c;\u5c06\u7269\u7406\u8f93\u5165&#xff08;\u6309\u952e\/\u624b\u67c4\u6309\u94ae&#xff09;\u6620\u5c04\u4e3a\u903b\u8f91\u52a8\u4f5c\u3002 \u8bbe\u7f6e\u6b65\u9aa4 \u9879\u76ee \u2192 \u9879\u76ee\u8bbe\u7f6e \u2192 \u8f93\u5165\u6620\u5c04 (Input Map)\u6dfb\u52a0\u52a8\u4f5c&#xff1a; 1. \u8f93\u5165\u52a8\u4f5c\u540d\u79f0&#xff08;\u5982 \"jump\"&#xff09;\u2192 \u70b9\u51fb\"\u6dfb\u52a0\" 2. \u70b9\u51fb\u52a8\u4f5c\u65c1\u8fb9\u7684 \"\" \u6309\u94ae 3. \u6309\u4e0b\u8981\u7ed1\u5b9a\u7684\u6309\u952e&#xff08;\u5982\u7a7a\u683c\u952e&#xff09; 4. \u53ef\u4ee5\u7ed1\u5b9a","og_url":"https:\/\/www.wsisp.com\/helps\/103300.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-10T00:49:17+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/103300.html","url":"https:\/\/www.wsisp.com\/helps\/103300.html","name":"6\u3001\u8f93\u5165\u7cfb\u7edf - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-10T00:49:17+00:00","dateModified":"2026-09-10T00:49:17+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/103300.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/103300.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/103300.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"6\u3001\u8f93\u5165\u7cfb\u7edf"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/103300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=103300"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/103300\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=103300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=103300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=103300"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=103300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}