Compare commits
No commits in common. "68602e7f23628414cb55896b5dd6d6b58c37f45b" and "47aa35a4c7313366cd30671824257946de3012ad" have entirely different histories.
68602e7f23
...
47aa35a4c7
3 changed files with 3 additions and 4 deletions
Binary file not shown.
|
|
@ -23,12 +23,12 @@ func get_movement_vector() -> Vector2:
|
|||
var x_strength: float = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
|
||||
var y_strength: float = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
|
||||
|
||||
if absf(x_strength) < DEADZONE and absf(y_strength) < DEADZONE:
|
||||
if abs(x_strength) < DEADZONE and abs(y_strength) < DEADZONE:
|
||||
return Vector2.ZERO
|
||||
|
||||
if absf(x_strength) < DEADZONE:
|
||||
if abs(x_strength) < DEADZONE:
|
||||
return Vector2(0, signf(y_strength))
|
||||
if absf(y_strength) < DEADZONE:
|
||||
if abs(y_strength) < DEADZONE:
|
||||
return Vector2(signf(x_strength), 0)
|
||||
|
||||
# use most recent axis press
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ height = 14.0
|
|||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
collision_mask = 2
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_dovo2")
|
||||
max_speed = 95.0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue