Make arrows gradually fall using code

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

I want to make the arrows in my top-down zelda-like game to gradually fall using code.
Just like the tears in The Binding of Isaac.

My code isn’t working and I have no idea how to make it work properly.

Here is my code:

extends RigidBody2D

var max_range = 50

func _physics_process(delta):
	if max_range > 0:
		max_range -= 1
	if max_range < 35:
		self.rotation_degrees += 2
	if max_range == 0:

If I had to guess, I’d say it’s that there’s too many physics process passes happening for you to notice the rotation of the arrow.

blurrred | 2021-01-28 19:55

Thank you for your comment!
The problem is the rotation change is just subtle changing, and it’s very weird looking

shoyguer | 2021-01-28 19:57