I have a RigidBody2D Node called fireball that will be spawning from bottom of the stage and shooting up. It has a gravity scale of 1.7 and I planned on it falling back down and flipping the sprite with it. The code so far is very simple, however, running early tests in the fireball scene doesn't have it flipping the fireball to show it flying downwards. Here is the code.

extends RigidBody2D

export var minspeed = 400
export var max
speed = 550

func process(delta):
var velocity = Vector2.ZERO
\$Sprite.flip_v = velocity.y < 0

Its a fairly simple code but it doesn't seem to be working, can anyone help me. I've also tried .y > 0 because I can never remember which direction is which for up and down.

Godot version 3.2.3
in Engine

In Godot negative y axis is towards above. So when your fireball goes up, it's y value must be decreasing. But the thing here is, are you sure it's value goes in negative ? Maybe you placed fireball at a location where it's y value becomes less as it goes up and more as it comes down but never becomes negative. Just my speculation

I think that might be the case. After I changed the equation to

\$Sprite.flip_v = velocity.y > -1

as well as

\$Sprite.flip_v = velocity.y < 1

The fireball would come up upside down instead, and not flip upright. How would I fix the thing you're describing where its y value only goes less but never negative?

I might be mistaken here, but it looks to me like you are setting velocity to Vector2.ZERO, which equals (0,0).
Then, velocity.y is not less than or greater than 0, so the flipv value would never change.
Maybe try using linear
velocity instead of a zero vector?