Character movement using another sprites direction

Godot Version

4.3

Question

What I have;
Its a top down camera style,
I have a character that moves with wasd.
I also now have a child sprite attached to the main character. It is offset from the main and spins around the character. Its an arrow. The arrow randomly stops in a given direction.

What I want; When the arrow stops I want to feed the direction of that arrow sprite to the main character. It will then give the character a bump in that direction. Then shortly after the arrow will spin again. Stop again and bump the character in that direction. The bumps may very in strength. But, I hope you get the idea.

I just need some help getting there or in the area so i can continue.

Let me know please! Thank you. I appreciate every response and all of your time.

Something like this probably:

@onready var arrow: Sprite2D = $ArrowSprite

func move_player_with_arrow():
	var player_push: Vector2 = Vector2.RIGHT
	player_push = player_push.rotated(arrow.rotation)
	velocity = player_push * 15.0
1 Like

That totally makes sense… and is really simple..

thanks so much! I’ll try that out and work from there.

1 Like