- Home /
Checking camera distance between object in a AR game
i would like to ask how i can check the distance between the object in the AR game scene to the camera, or if i could set a collision on the camera view ,( something like frustum culling) in an AR game. some examples would be nice if any of u can provide thanks.
Augmented reality, im doing a game using it and i just want to know if is it possible to do a collision check similar to a frustum view.
I've seen this used around here before. See, to me, Augmented Reality is an end, not a means- but there are people who talk about it like it's some kind of library, or program! Could you post a link to the thing you are talking about? To me, Augmented Reality means the use of computer graphics / processing to interpret the real world in an interactive way, but you seem to be talking about something more specific than that!
http://www.youtube.com/watch?v=$$anonymous$$IGH5WG$$anonymous$$nbs im trying to do something similar to it where i suppose its using some kind of collision detection from the camera to the char, to activate the different states of the AI.
Ok, I understand now. We are on the same page after all! What have you got so far? Is camera input working properly? You'll have to come up with some way of creating a simplified 'virtual world' based on the image data from the camera. It's a problem which is way, way too complicated for me, but if you can come up with something, please post it on the Unify wiki for the world to see!
Answer by roamcel · Oct 25, 2011 at 07:01 AM
There's certainly many, many complex ways to solve this, but if you're looking for a basic solution, then you need to create a 'preset environment'.
Basically, you have to define some sort of bounds in which the action takes place. For example, giving somewhat detailed instructions:
"place the object on a table, and your camera a meter away from it"
then you create a collider set that resembles the table, and use that as your reference collision plane.
Basically all approaches derive from this logic, wether you dynamically instantiate the environment from a photo, or you completely hardcode it.
could u show me some sample video or pseudo code on how to do it?