Log in or register to post comments

Have 3d object lerp back on to the ImageTarget

October 4, 2017 - 3:18am #1

Currently i've a 3d object attached to the image target. On tracking lost, i've edited the vuforia tracker handler to still render the 3d object on screen even with the image target lost.. 

On tracking found, the 3d object will snapped back to the image target.

However i will like to have the 3d object lerp back to the image target position instead of it snapping back in an instant.

 

Is there any where to achieve this? I have tried to manipulate the ar camera but to no avail.

Have 3d object lerp back on to the ImageTarget

October 23, 2017 - 9:23am #4

You can get the Image Target's position by calling "gameobject.transform.position" on any script attached to the Image Target game object. For example, in the Core Samples, you can access that field within the DefaultTrackableEventHandler.cs script to get the position of whichever Image Target it is attached to.

Thanks,

-Vuforia Support

Have 3d object lerp back on to the ImageTarget

October 23, 2017 - 3:52am #3

Thank you so much for your reply! 

How do i find the image target position?

When i detach the 3d object from the image target, i'm able to manipulate the position and centered it on the screen. However this only work when i only move the camera on the y-axis if not the field of view will change cause my object to be cut off

AttachmentSize
Image icon ss00.PNG163.38 KB
Image icon ss01.PNG825.56 KB

Have 3d object lerp back on to the ImageTarget

October 10, 2017 - 4:43pm #2

Hello MangoPudding,

You should be able to achieve something like this with the following steps:

  1. Detect your target
  2. Show your model
  3. Lose tracking on your target
  4. Detach your model from the image target and continue showing the model
  5. Detect your target again
  6. Re-attach your object to the image target and lerp it back to the image target

You'll need to make sure that your target is keeping track of whether it has been detected yet or not so that it doesn't try to snap the model back on the starting point on the second detection.

Is this similar to what you are trying? Let me know if you have any questions.

Thanks,

-Vuforia Support

Log in or register to post comments