I'm developing a game similar to Pokemon Go in Unity3D. Using Kudan AR SDK. My requirements are straightforward, the AR object must face the camera at all times. I am totally clueless on how to get this done with Kudan AR. In other words, i wanna disable the gyroscope's rotation data from kudan.
Asked
Active
Viewed 2,141 times
3
-
Are you using the SLAM or the marker? if SLAM then I gues syou would need to disable gyroscope ads it is what controls the rotation. – Everts Sep 02 '16 at 06:12
-
1https://docs.unity3d.com/ScriptReference/Transform.LookAt.html Unity has documentation for stuff like this. Always try to exhaust the resources available to you before coming to a site like StackOverflow for answers. – DisturbedNeo Sep 02 '16 at 08:44
-
@Everts Using SLAM. – Pavan Chopra Sep 03 '16 at 08:41
-
@DisturbedNeo After debugging for a while, I found that the Kudan Camera GameObject doesnt rotate or move as per camera movements in physical world. Its always at 0,0,0 with 0,0,0 rotation. The gyroscope data is directly applied to the AR object. The object i'm tracking is a floating monitor (kind of future tech). So, the monitor shouldnt rotate along X and Z axis. It must only rotate along Y axis i.e Up axis. So, how do i manipulate the gyroscope data? – Pavan Chopra Sep 03 '16 at 09:33
2 Answers
0
This isn't really a KudanAR issue. Unity3D handles all of the rendering, so if you want your model to face in a different direction you will need to achieve this using Unity's APIs.
Kudan's Unity plugin is only responsible for the computer vision side of things, meaning that it takes care of the recognition and tracking.

MultiColourPixel
- 1,222
- 10
- 19
-
I think he meant to get the model to always face like it is done at the end in this one https://www.youtube.com/watch?v=iU5gC6fZbf4&feature=em-subs_digest. For instance, running on a device with no gyro, the model will face the user since the gyro controls the rotation of the object (at least this is how I have been experiencing). So in the method reporting the position and rotation (don't remember the name), the rotation part could be skipped. Or gyro to be disabled. This is how I understand the question. – Everts Sep 02 '16 at 10:30
-
@Everts Exactly. That's what i meant. However, it must rotate only along Y (up) axis. As if you were watching TV. – Pavan Chopra Sep 02 '16 at 19:33
-
@Everts After debugging for a while, I found that the Kudan Camera GameObject doesnt rotate or move as per camera movements in physical world. Its always at 0,0,0 with 0,0,0 rotation. The gyroscope data is directly applied to the AR object. The object i'm tracking is a floating monitor (kind of future tech). So, the monitor shouldnt rotate along X and Z axis. It must only rotate along Y axis i.e Up axis. So, how do i manipulate the gyroscope data? – Pavan Chopra Sep 03 '16 at 09:33
-
Camera does not rotate indeed. It is opposite to basic AR where object is at origin. This is why I was saying you need to find that method that controls the rotation of the object. Then comment it. As a result your object will keep the initial rotation. – Everts Sep 04 '16 at 13:23
0
The solution is the following in the scripts of your objects:
First declare:
public Transform player;
and link your Kudan Camera to the player in the inspector chase skript of your object:
And the importend line in the update method:
this.transform.LookAt (player);
Your object is now looking at you.
Hope this helps!

Timo Schuck
- 314
- 3
- 11