well, i dont know why but moveandslide are wrong, anyone can help me?
code:
extends Node2D
const UP = Vector2(0,-1)
const BOOST = 200
const GRAVITY = 10
var motion = Vector2()
func _ready():
pass # Replace with function body.
func physicsprocess(delta):
motion.y += GRAVITY
if Input.is_action_just_pressed("ui_accept"):
motion.y =-BOOST
motion = move_and_slide(motion,UP)