Author Topic: Screen Edge Detection  (Read 589 times)

aer0ace

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Screen Edge Detection
« on: March 06, 2018, 11:01:10 AM »
I'm wondering how everyone else does their screen edge detection.
I'm currently using Camera.pixelWidth/pixelHeight and then comparing a UIWidget's localPosition to these values to detect if the widget is close to the edge of the screen. I imagine I have to adjust the screen edge threshold depending on the current screen resolution, but that's not too big of a deal. I'm not sure if this is the proper way to do it, or if it's error prone in some way.