Move and Slide & Floating Mode
This commit is contained in:
@@ -24,8 +24,7 @@ func set_move_direction(dir):
|
||||
move_dir = dir
|
||||
|
||||
func move_player(delta):
|
||||
position.x += move_dir.x * max_walk
|
||||
position.y += move_dir.y * max_walk
|
||||
move_and_collide(move_dir * max_walk)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
|
||||
Reference in New Issue
Block a user