Hello! I am currently building a view in defold thats essentially just a map the the user can zoom, pan, and make selections on. The first problem I faced was how to get the edge coordinates of the part of the screen actually being displayed when the user zooms in because when you zoom the actual camera coordinates don’t change. The method I used is honestly pretty inefficient however it works for now but the reason I needed to do that was so that I could use the current view coords to ensure that even when the user is zoomed in they cant move the camera off the screen while still being able to pan to the edge of the map. This now brings me to my actual question, is there a was to set a limit or something that can restrict the camera to within a specific area? Right now I’m using a method that kind of works by checking each individual edge coord to see if they are outside of the area with if statements however it doesn’t work well when the user tries to move diagonally.
Edit: Is it possible to use comparative operators on vector3s? With a new potential solution I found using comparative operators would be very easy and efficient but I cant get it to work and don’t see any information about it. (ex: vmath.vector3(30,20,1) >= vmath.vector3(29,19,1))