Search Unity

How would I make an offscreen indicator ONLY at the bottom of the screen?

Discussion in 'Scripting' started by ChadrickEvans, Dec 14, 2019.

  1. ChadrickEvans

    ChadrickEvans

    Joined:
    Mar 14, 2015
    Posts:
    46


    I was referred to this video to track objects once they've gone off screen. While it works for this situation, I'm curious to see if it would be possible to do this only for the bottom of the screen.

    I want to use this example to create a distance indicator for objects that are "locked onto".
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,752
    Sorry, I didn't watch the 12-minute tutorial... but since you did and have the code in front of you, just look for the place that either checks against edges, or decides which edge it is off of, and if it isn't off the edge you want, don't draw the indicator.