Godot Version 4.2
Question
Can anybody tell me what I am doing wrong in this code my sprite doesn’t appear to flip when I input instead it stops my movement
Can anybody tell me what I am doing wrong in this code my sprite doesn’t appear to flip when I input instead it stops my movement
nothing looks wrong here
What value is SPEED set to? Does this need to be higher?
Speed is set to 300.0
What you said hleped my movement isn’t jamming anymore but how am I supposed to give the sprites a name its already a variable for $sprite2D
*I am extending a charecter body 2D node
Continue as you were, you can use the node path shortcut, $Sprite2D
, or create a new variable with @onready var sprite_2d: Sprite2D = $Sprite2D
.
Check out the docs to better understand how to get a hold of nodes in your scripts, there are a number of methods, Nodes and scene instances — Godot Engine (stable) documentation in English.
The problem don’t come from the part of the script you show us. It can be a problem from your node tree or a problems somewhere else in your script or something else.