Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Sign in to follow this  
geckoo

Horizontal Compass

Recommended Posts

Just a little script which I have done to help someone recently. It allows to create, using the new UI, a smooth horizontal compass.

Regarding the North pole and the player position, it computes a value between -0.5 and 0.5 - exactly what we need so as to set the sprite offset.

Put it on your player, set your sprite - no more ++

 

0 is the North,

0.25 is the West,

-0.5/0.5 is the South,

and -0.25 is the East

 

DON'T FORGET - IMAGE WRAP MODE TO "REPEAT"

 

Please login or register to see this code.

 

  • Like 4

Share this post


Link to post
Share on other sites

Please login or register to see this spoiler.

Fantastic.... I have no words.....
Thank you very much

Edited by PizzaMan

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

Io sono molto contente que ti piaccia ciò che ho fato. Grazie per i complimenti :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...