I'm doing the controls and It's not really working and It might has to do with this error right here:
error(13,0): Unindent does not match any outer indentation level.
But I have no idea how to fix it. Here's the code by the way:
extends KinematicBody2D
const GRAVITY = 500.0
const WALKSPEED = 200
var velocity = Vector2()
func _fixedprocess(delta):
velocity.y += delta * GRAVITY
if (Input.isactionpressed ("Left")):
velocity.x += -WALKSPEED
elif (Input.isactionpressed("Right")):
velocity.x -= WALKSPEED
else:
velocity.x = 0
var motion = velocity * delta
move( motion )
if (iscolliding()):
var n = getcollisionnormal()
motion = n.slide(motion)
velocity = n.slide(velocity)
move(motion)
func _ready():
setfixed_process(true)