0 votes
    extends KinematicBody
var gravity =Vector3.DOWN * 12
var speed = 4
var jump_speed = 6
var velocity = Vector3()
func _physics_process(delta):
    velocity += gravity * delta
    velocity = move_and_slide(velocity,Vector3.UP)
func get_input():
    velocity.x = 0
    velocity.z = 0
    if Input.is_action_pressed("move_forward"):
        velocity.z -= speed
        if Input.is_action_pressed("move_back"):
            velocity.z -= speed
        if Input.is_action_pressed("strafe_right"):
            velocity.x -= speed
        if Input.is_action_pressed("strafe_left"):
            velocity.x -= speed
            func _unhandled_input(event):
       if event is  InputEventMouseMotion:

I am getting a error on line 21 (Error parsing expression, misplaced: func)
I added indentation and there were no extra spaces, Does anybody know how to fix this?

Godot version 3.2
in Engine by (19 points)

1 Answer

0 votes

Don't add indentation to a function declaration.

by (8,150 points)

Thanks for the help it works now

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.