#Getting StringName from Input.get_vector

1 messages · Page 1 of 1 (latest)

austere hull
#

Hi, I have a direction variable set up like this

var player_direction = Input.get_vector("left","right","up","down")

The goal is to have an animation variable based on direction, like:

var anim_name = "idle" + str(player_direction)

Is it possible to return the key names from the Input.get_vector method? or do I need to convert them manually using if statements?

fathom star
austere hull
dense adder
#

Have you looked into using an AnimationTree with an AnimationNodeStateMachine as the root?

dim ginkgo