Added CheckMouseToObjectsPosition Function

Function was made to make the main function smaller.