Log in or register to post comments

Teapot Object flicker when change position in ImageTarget Sample

February 20, 2013 - 4:59am #1

Hi,

I am working on ImageTarget Sample. What I am doing I am using 2 Target at same time. In First Target I have a Floor and some and on second target I have default teapot, when First Target show walls and floor I put second target which include teapot on it. Actually floor hiding teapot and on TriggerStay function I update Teapot position and keep teapot on above of floor(by taking floor current position) "teapot.transform.position = new Vector3(floor.transform.position.x, floor.transform.position.y, floor.transform.position.z);". But by this my Object keep flickering. I getting confused what is happening. I change box collider to mesh collider and also i tried to remove collider. I also used "Lerp" function of Vector3 for animating but flickering still continue. I think Its because QCAR sdk updating teapot position and on same time in my own script I am also updating its position, so thats why its flickering. I need to disable QCAR position and use my own position so that I can keep teapot on above of floor. Kindly help me on that. This will be great for me. Thanks

Teapot Object flicker when change position in ImageTarget Sample

February 20, 2013 - 9:26am #3

Hi, you probably don't need to "disable the QCAR position";

one simple thing you could try is to create an empty gameobject (in place of the current teapot) attached under your Trackable, and then add the teapot as a child of that empty gameobject, i.e. your scene hierarchy will be like:

  • MyImageTarget
    • MyEmptyGameObject
      • Teapot

This way, you can set the localPosition of the teapot (e.g. move it above the floor), without worrying about being in conflict with QCAR positioning.

I hope this helps.

Teapot Object flicker when change position in ImageTarget Sample

February 20, 2013 - 9:15am #2

One possibility: if you are using two markers, have you confirmed your World Centre Mode is Changed either to None, or User Defined (probably the First marker if there's an order in which it should be tracked)?

Log in or register to post comments