#Making a compass

1 messages · Page 1 of 1 (latest)

wind sapphire
#

Also do I need to separate the textures?

upper onyx
#

Can I help you with this

wind sapphire
#

Sure

upper onyx
#

Ok tell me more about it

wind sapphire
#

Im not too sure how much more in detail i can go. i have a compass needle that needs to go around the green circle, and it needs to point the same direction that the player is to the set location

upper onyx
#

Ok

#

I can do it for you

#

But before I will continue can I quickly know your budget for this

wind sapphire
#

can you help me learn how to do it? i would rather that than the answer

#

LOL

#

get outta here

upper onyx
#

Yeah sure

#

Just let me know your budget

fallen hull
#

you should get a reference of the player and your target in the compass then just calc the angle between the player and the target and repoduce it ?

empty nest
#

You can use the global position of both objects and Vector2.direction_to() to get a vector pointing from one to the other.
You can then use Vector2.get_angle() to get the required rotation (as a float)

Keep in mind that in 2D, angle 0 is considered to be pointing to the right. So the sprite should be drawn like that.

wind sapphire
#

Sorry, i ignored the channel because of that guy

#

thank you guys' for your responses

#

didnt know direction_to was a thing