I am working on a project that involves a submarine and I want to show the player what depth they are at using kind of like a ruler scale that has an indicator or arrow pointing to their depth on the number line. However, anytime I search anything related to “depth” and Unity I just get a bunch of non-related hits. So, can anyone point me towards any tutorials or information that can help explain how to achieve this effect? I’ve included a mock-up of what I am kind of going for.
If your world is using Unity’s coordinate system, can’t you just use the Y value (which is height in Unity) times your scale (general 1 unit - 1 meter) compared to some point you’ve defined as sea level?
Edit: sorry, I think I totally misunderstood the question.
It is just two sprites or two images placed on top of each other.
The scale image doesn’t move, and the “needle” one does. Modify coordinate of the “needle” based on the depth, and that will be it.
3 Likes