Closed ziselos closed 6 years ago
Your idea is crosshair, right? you can put this image on screen with x = centerX - image.width/2 and y = centerY - image.height/2. If the coordinate of object is within range (x > centerX - image.width/2 && x < centerX + image.width/2 && y > centerY - image.height/2 && y < centerY + image.height/2), then you can change color or image of object based on canvas
2018-01-15 20:22 GMT+07:00 Zisis Dimitriadis notifications@github.com:
Is there a way to detect if the center of screen passed from an ARObject? For example suppose we have an image in the center of screen and we want to detect when that image passed from the object.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dat-ng/ar-location-based-android/issues/18, or mute the thread https://github.com/notifications/unsubscribe-auth/ABOmjHsLDQc4QWrorfhbhTBunKHrT-AXks5tK1EVgaJpZM4ReZ5i .
For example i put a rectangle in the ar layout (center) and i would like when i move the mobile and the ar object placed into the area of the rectangle to change the color of object based on canvas. The rectangle is always in center of my screen (as i declared it in the layout)
I tried your suggestion and works fine. Thanks a lot for your response.
Is there a way to detect if the center of screen passed from an ARObject? For example suppose we have an image in the center of screen and we want to detect when that image passed from the object.