he wont move :(

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By starkid

he is not moving when i press the buttions. project settings are checked and updated so things should happen when i press the buttions but they dont.


extends KinematicBody

var MOVE_SPEED = 14
const JUMP_FORCE = 30
const GRAVITY = 0.98
const MAX_FALL_SPEED = 30
const H_LOOK_SENS = 1.0
const V_LOOK_SENS = 1.0
onready var _cam = $Spatial/Cambase
onready var anim = $Graphics
var y_velo
var on_ground = true
var has_double_jumped

func ready():
#anim.get_animation(“walk”).set_loop(true)
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

func _input(event):
if event is InputEventMouseMotion:
_cam.rotation_degrees.x -= event.relative.y * V_LOOK_SENS
_cam.rotation_degrees.x = clamp(_cam.rotation_degrees.x, -90, 90)
rotation_degrees.y -= event.relative.x * H_LOOK_SENS

func _physics_process(delta):
var move_vec = Vector3(1, 1, 1)
if Input.is_action_pressed(“move_forwards”):
move_vec.z -= MOVE_SPEED
if Input.is_action_pressed(“move_backwards”):
move_vec.z += MOVE_SPEED
if Input.is_action_pressed(“move_right”):
move_vec.x += MOVE_SPEED
if Input.is_action_pressed(“move_left”):
move_vec.x -= MOVE_SPEED
move_vec = move_vec.normalized()
move_vec = move_vec.rotated(Vector3(0, 1, 0), rotation.y)
move_vec = MOVE_SPEED

var grounded = is_on_floor()
var y_velo = GRAVITY
var just_jumped = false
if Input.is_action_just_pressed("jump"):
	just_jumped = true
	y_velo = JUMP_FORCE 
	if just_jumped == true and has_double_jumped == false:
		y_velo = JUMP_FORCE
		has_double_jumped = true

if grounded and y_velo <= 0:
	y_velo = -0.1
if y_velo < -MAX_FALL_SPEED:
	y_velo = -MAX_FALL_SPEED

func play_anim():
pass
`

:bust_in_silhouette: Reply From: gamedevshirious

Have you set up your input names in InputMap ?
Follow the below tutorial: