#How to make an indicator "live" in a circle around the player

5 messages · Page 1 of 1 (latest)

desert frost
#

Hi! I am creating a prototype for a game where the player controls a spacship that has to navigate through space from checkpoint to checkpoint.
I have my space and a checkpoint in the prototype level. The ship is successfully detecting the checkpoint. Now I want an indicator (an arrow) floating around the spaceship in a circular orbit, and I want that arrow to point to the checkpoint at all times.

But I don't know how to achieve that. I have added a child Sprite2D to the Ship scene and I've managed to make the arrow always point to the checkpoint, but the arrow itself doesn't move, it only rotates.

How can I make this work? (I'm still pretty rusty in vector math, I'm sure the answer is an easy one, but I can't find it...)

sterile gyro
#

Heya! I am currently doing a course so I could not make this fancy. But one way to achieve this is to have a "pivot". Add a node to the center of your spaceship and have an offset with like 100/300 pxl (it depends on your game object sizes) and add a texture/arrow there. Now rotate the center node. When you rotate the center node the "arrow" or in my case the sprite follows an outer line which I think is what you want. Hope this was it.

#

(screenshots are in ultrawide so you have to open them)

desert frost