Log in or register to post comments

Roll a ball- Test application

November 17, 2011 - 12:23pm #1

I'm triyng to pass the application of a "Roll a ball" app (http://unity3d.com/support/resources/files/Roll-a-Ball.zip) to AR, and I got almost, the only thing missing is the ball interacts with the rotation of the tracking point, in this case a piece of paper. In the original application, by rotating the iPhone, the ball moves, and the idea is when rotating the paper, do the same.

Can anybody help me? In the original application, the scripts are unityscript, like javascript, but I have not found the api documentation for QCAR.
I suppose that I have to do a .cs script, but I don't know very well, how configure and acces the rotation of the tracking point... If anybody can help me, I'd be grateful.


Re: Roll a ball- Test application

December 8, 2011 - 9:28pm #8

haha, Add another name to the list of people who want to know how to do this.

Re: Roll a ball- Test application

November 30, 2011 - 1:48am #7

I have also interest in this but i have not found anything useful. I cant even find that game. Maybe Ksiva can tell share more info about it.

Re: Roll a ball- Test application

November 29, 2011 - 9:45am #6

Yes, this is!!! in the second 45.!!!!

But it seems that he has the hand very "fixed", is just a 2 seconds sequence.. I would to see the game "in live"....

Anybody helps¿?¿?

Re: Roll a ball- Test application

November 28, 2011 - 11:45pm #5

It can be done. http://www.youtube.com/watch?v=N-pvrZZ0PlE forward video for 45 seconds.

Re: Roll a ball- Test application

November 28, 2011 - 8:02pm #4

QCAR only gives you the position of the device in relation to a target. It does not know how the target or the device is oriented in the real world.

It sounds like you need to know the real world position of the device. To determine this you need to bring other sensor data into play. For example, you can use the accelerometer to find a rough gravity vector by applying a low pass filter. This is outside the scope of what we can help with, however.

- Kim

Re: Roll a ball- Test application

November 26, 2011 - 4:30am #3

Thanks for the answer.

I tried this but I have a problem.

The object of all is move the ball with the rotation of the paper. If I rotate to left, the ball goes to left, I rotate to right, the ball goes to right, rotate up, rotate down..... with this values I generate a vector and apply a force to move the ball.

The camera and the tracking paper is in movement, for this reason if I set the ARCamera to None, it doesn't work.

I have to track the camera (my iphone in one hand), and the tracking marker (a peace of paper with the mark in my other hand).

First I have a lot of test, for logging the rotation degrees of the camera, with the AUTO option, and there are several times that give me the rotation of camera, and sometimes, the rotation of the marker (I think.. because the values are varying a lot of..270, 274, 280, 20, ?¿?, for this I think that it give me this values..)

Then I try with the NONE option, and ok, if I put the camera totally perpendicular to the marker in vertical, is the "point 0" of the tracking, and I say "eureka" it works... but not.. because if I move the camera and my marker is for example on the table (static) (remember.. iphone in my hand...), the rotation values change, and then give me values that don't works.

The question is.. :) how can I tracking both (I suppose that I have to tracking both ?¿), but that only affects the rotation of the marker to the ball?

Thanks, thanks and another time thanks for your help.


Re: Roll a ball- Test application

November 19, 2011 - 9:34am #2

The QCAR Unity extension takes care of moving trackable objects in relation to the AR Camera. It does this by changing the transform of the trackable object and/or the camera. You can change which objects are held still in relation to others via the World Center Mode setting on the AR Camera:

The first trackable found is used to move the camera (i.e. the trackable stays still in the scene while the camera moves around it). All other trackables are then moved in relation to the camera.

Same as above, but you can select a single trackable to act as the world center, and it never moves in the scene.

The camera never moves, instead all the trackables move around it.

So if you wanted to move the camera around and make sure QCAR didn't move it you would use the NONE setting.

- Kim

Log in or register to post comments