updating action names in player controller
This commit is contained in:
parent
aca35b34a0
commit
b3e1bc1a45
|
|
@ -198,8 +198,9 @@ func _physics_process(delta: float):
|
||||||
_handle_jitter(delta)
|
_handle_jitter(delta)
|
||||||
|
|
||||||
func _handle_movement(_delta:float):
|
func _handle_movement(_delta:float):
|
||||||
var input:Vector2 = Vector2(Input.get_action_strength("player_right") - Input.get_action_strength("player_left"),
|
#TODO: change this to the Four-Axis call with SteamInput!
|
||||||
Input.get_action_strength("player_backwards")*0.8 - Input.get_action_strength("player_forwards"))
|
var input:Vector2 = Vector2(Input.get_action_strength("walk_right") - Input.get_action_strength("walk_left"),
|
||||||
|
Input.get_action_strength("walk_negative")*0.8 - Input.get_action_strength("walk_positive"))
|
||||||
|
|
||||||
if input.length()>1:
|
if input.length()>1:
|
||||||
input = input.normalized()
|
input = input.normalized()
|
||||||
|
|
@ -215,7 +216,7 @@ func _handle_movement(_delta:float):
|
||||||
func _handle_rotation(delta:float):
|
func _handle_rotation(delta:float):
|
||||||
var smoothness = min(3, 60.0/Engine.get_frames_per_second())
|
var smoothness = min(3, 60.0/Engine.get_frames_per_second())
|
||||||
|
|
||||||
var input_speed := Vector2( Input.get_action_strength("look_right")-Input.get_action_strength("look_left"), Input.get_action_strength("look_up")-Input.get_action_strength("look_down")) * gamepad_response
|
var input_speed := Vector2( Input.get_action_strength("look_right")-Input.get_action_strength("look_left"), Input.get_action_strength("look_positive")-Input.get_action_strength("look_negative")) * gamepad_response
|
||||||
|
|
||||||
# secretly, inverted y axis is the default
|
# secretly, inverted y axis is the default
|
||||||
if not State.inverty_y_axis: input_speed *= Vector2(1, -1)
|
if not State.inverty_y_axis: input_speed *= Vector2(1, -1)
|
||||||
|
|
@ -275,7 +276,7 @@ func _input(event: InputEvent) -> void:
|
||||||
elif Input.is_action_just_pressed("zoom_out_mouse"):
|
elif Input.is_action_just_pressed("zoom_out_mouse"):
|
||||||
zoomed = false
|
zoomed = false
|
||||||
|
|
||||||
if event.is_action_pressed("collect_memento_ui") or event.is_action_pressed("option_memento_ui"):
|
if event.is_action_pressed("interact") or event.is_action_pressed("summarize"):
|
||||||
if focus_ray.is_colliding():
|
if focus_ray.is_colliding():
|
||||||
var collider := focus_ray.get_collider()
|
var collider := focus_ray.get_collider()
|
||||||
if collider is Interactable:
|
if collider is Interactable:
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ toggle_fullscreen={
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194342,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194342,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
collect_memento_ui={
|
interact={
|
||||||
"deadzone": 0.2,
|
"deadzone": 0.2,
|
||||||
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
|
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
|
||||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue