By Mike123
on Wed, 07/17/2013 - 18:09
Hi,
I have found the way to transform touches on the screen, to points in 3D space following the Dominoes sample application.
My trouble is that the transformed touches are "translated" to the left by some points leading to incorrect results. I have followed the code in the dominoes app and there are no differences with mine, the projection matrix is also the same. I had concerns that I accidentally modified the modelview matrix before using it to transform 2D to 3D points but this is not the case.
Any ideas why the points of intersection with the marker plane are offset to the left?
Thanks,
Mike
3D touch error
Are the touches translated left in the Dominoes sample?
N
3D touch error
No.
I am wondering if the following code is sufficient for my needs:
3D touch error
I have made another project modifying the ImageTargets sample to make sure I was doing things the right way.
What I have noticed is that although lineStart seems correct, the lineEnd point is skewed by a great amount to the left. Why would that be?
3D touch error
Nothing obvious springs to mind from looking at the code, but it is hard to debug.
If I understand correctly what you are saying is that the touch point is fine in the dominoes app, but your version in your own app results in it being skewed to the left.
3D touch error
Nalin,
thanks for your reply.
3D touch error
I am not able to test out the code at this moment.
One possibility I could think of is the Scene Units as specified in the Target Manager. It might be worth experimenting a little here with different targets, each with different units.
N
3D touch error
I am using the standard "stones" image target by Vuforia both for the Dominoes and the ImageTargets samples. Is there a setup for unit changes within the xcode ImageTargets sample?
3D touch error
Not an answer , but I am facing the same issue , the touch points are translated to bottom left if I am close to the target image and top right if i take the camera far away from the target image. Somewhere in between they seem to be aligned properly. Any clue why this may be happening ?
3D touch error
Victor,
3D touch error
Having modified yet another ImageTargets sample I found out that when the device is rotated in landscape mode, the coordinate system of the image target is rotated by 180 degrees. This is why in my case, the intersections with the target plane were going haywire.
3D touch error
Sorry this is causing you such problems.
3D touch error
Nalin,
I can't thank you enough for your last answer! Although it was not definitive it did point me to the right direction.
3D touch error
Your welcome!
Glad I could help.
N