How do I fix "get_vecter()" not found in base "GDScriptNativeClass". ?
Asked Answered
D

4

0

extends CharacterBody2D

func _physics_process_Delta():
var direction = get_vecter("move_left", "move_right", "move_up", "move_down") what is wrong
velocity = direction * 600
move_and_slide()

if velocity.length() > 0.0:
	$HappyBoo.play_walk_animation()
else:
	$HappyBoo.play_idle_animation()

I don't know what is wrong with it. I am following a tutorial. Here is the link-

Dugaid answered 4/3, 2024 at 19:48 Comment(0)
V
1

It should be Input.get_vector instead of get_vecter

Vehemence answered 4/3, 2024 at 21:33 Comment(0)
D
0

extends CharacterBody2D

#Line 5:Static function "get_vecter()" not found in base "GDScriptNativeClass".

func _physics_process_Delta():
var direction = Input.get_vecter("move_left", "move_right", "move_up", "move_down")
velocity = direction * 600
move_and_slide()

if velocity.length() > 0.0:
	$HappyBoo.play_walk_animation()
else:
	$HappyBoo.play_idle_animation()

it saids Line 5:Static function "get_vecter()" not found in base "GDScriptNativeClass".

Dugaid answered 5/3, 2024 at 19:24 Comment(0)
D
0

I fixed it now

Dugaid answered 5/3, 2024 at 19:25 Comment(0)
V
0

Dugaid When you get an error like this always first check that you spelled the function name correctly.

Vehemence answered 5/3, 2024 at 19:53 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.