simon-heinen / droidar

DroidAR Mobile Locationbased Augmented Reality Framework for Android
GNU General Public License v3.0
225 stars 274 forks source link

Add and update edit text in droid ar #9

Closed CrispyBreadsticks closed 11 years ago

CrispyBreadsticks commented 11 years ago

Hi, This may seem a stupid question to ask but I am unable to figure it out so I am going to ask it . I want to add a 2d text box , at a defined location. So lets say the user points at a particular location, I want to add a button on the camera view , and when the user clicks it it will ask him what object he wants at that location. After he selects the type of object I will display it. I also want to refresh the data displayed(eg:update the points). I looked at GeoPos. I know I have to use it. I also looked at place objects which adds a 3d component. I want to add a 2d component and update the data. Could you please provide some pointers as to how to do this? Also I see deprecated methods with no javadoc telling us what to use instead. For example:void gl.CustomGLSurfaceView.addOnTouchMoveAction(TouchMoveListener action) Edit: I tried out the place object demo. I stil dont get how this is entirley supposed to work. I add an object at a particular loaction but when I go to another room , which is to the right of the object I can still see the old object. Whats the best way to place objects using latitude and longitude?

simon-heinen commented 11 years ago

You could add a 2d image in the 3d space which looks like a button and replace it after the object is loaded. take a look at the demo setups there is one where i added an android view in the 3d space (a button which says click me) and use this code. Is that what you need?

CrispyBreadsticks commented 11 years ago

Right now I am having another problem. Even if I add an object using GeoPos at a specific location which is confirmed with a latitude and longitude app the image arrow(I have replaced solar system with this) shows up at various other places. I can still see it if I move away and to another location.Do you know why? Is this the expected behaviour.

simon-heinen commented 11 years ago

at various other places? hm so sometimes gps is not accurate of course but it should stay at the placed location. can you explain "various other places" a little bit more?

CrispyBreadsticks commented 11 years ago

Well the thing is its a pretty new phone. I downloaded an app and it shows me the exact coordinates and it is pretty precise. However lets say the object is right in front of me and I have entered those co-ordinates on the geopos setup. If I move to the right to another room I still can see the arrow. In reality the arrow isnt supposed to at that location. Is there anyway to make it more accurate cause I dont think its a hardware limitation since I can see the last digits change significantly when I move from one room to another in the latitude and longitude app?

simon-heinen commented 11 years ago

GPS does not realy work indoors, the gps position will jump around alot, thats why we buffer it in the location manager and combine it with step detection. you can change this for example by changing the parameters in the location manager: https://github.com/bitstars/droidar/blob/master/droidar/src/system/ConcreteSimpleLocationManager.java and reducing the location buffering, but i dont think that you will get much better results. constant jumps of the virtual scene often look much worse than what you currently experience

CrispyBreadsticks commented 11 years ago

okay. Thanks a lot for the help

anouarcharif commented 10 years ago

Hello,

Im asking if we can play a video from youtube as a target ?

Can someone please provide me the steps to follow ... im a begginer in droidar ...

Thank you