I am working with Unity and Vuforia.
I need to place an object when user touches the screen. Taking a picture and location info of the place they touch for the object to appear. (allowing user to move the object if it doesn’t appear exactly where they expect)
I have the AR camera running and can view object that have an image associated (learned from demo videos), but how do I make that object appear on touch and anchor to that location?
Thanks in advance for your help.
I could not fully decode your question. If you want to place an object in 3d space, when you detect an image target, you could do the following.
- Add an image target and put a cube (or any empty object) as it’s child.
- When you want to create the object (when the Image target is found), save the transform component of the cube to a local variable.
- Instantiate the appropriate object using the prefab and apply the saved transform values to it.
- Now it can be moved or rotated with user events such as touch or drag.
Hope it helps. Feel free to prove me wrong