Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Waffles |
extends KinematicBody2D
var v = Vector2(0,0)
func _physics_process(_delta):
if Input.is_action_just_pressed(“right”):
v.x = 100
if Input.is_action_just_pressed(“left”):
v.x = -100
move_and_slide(v)
v.x = lerp(v.x,0,0.1)