I am making a 2D map editor, I am using OpenGL with GLFW, GLEW and GLSL. I want to select the entities and drag them with the mouse. I compare the position of the mouse with the 4 edges of the entity, but my method is not precise, especially when I move the camera. Which formula o method i can use for this?
PD: Sorry for bad english.