disable strafe with only keyboard
This commit is contained in:
parent
09c4476938
commit
4608af0f80
2 changed files with 18 additions and 26 deletions
|
@ -73,9 +73,6 @@ func _physics_process(delta):
|
||||||
input_dir = Input.get_vector("ui_right", "ui_left", "ui_down", "ui_up")
|
input_dir = Input.get_vector("ui_right", "ui_left", "ui_down", "ui_up")
|
||||||
else:
|
else:
|
||||||
var y = 0
|
var y = 0
|
||||||
if Input.is_action_pressed("ui_strafe_right") or Input.is_action_pressed("ui_strafe_left"):
|
|
||||||
input_dir = Input.get_vector("ui_strafe_right", "ui_strafe_left", "ui_down", "ui_up")
|
|
||||||
else:
|
|
||||||
if Input.is_action_pressed("ui_right"):
|
if Input.is_action_pressed("ui_right"):
|
||||||
y -= 1
|
y -= 1
|
||||||
if Input.is_action_pressed("ui_left"):
|
if Input.is_action_pressed("ui_left"):
|
||||||
|
|
|
@ -45,18 +45,13 @@ ui_down={
|
||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"unicode":0,"echo":false,"script":null)
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
ui_strafe_left={
|
|
||||||
"deadzone": 0.5,
|
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":true,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"unicode":0,"echo":false,"script":null)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
ui_strafe_right={
|
|
||||||
"deadzone": 0.5,
|
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":true,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"unicode":0,"echo":false,"script":null)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
ui_strafe={
|
ui_strafe={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"pressed":false,"double_click":false,"script":null)
|
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"pressed":false,"double_click":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
move_run={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":0,"physical_keycode":16777237,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue