Log in or register to post comments

Camera motion detect

January 19, 2014 - 11:08pm #1

 I have a issue that, in my App, I want to catch event when camera is not move (status silence in some seconds).

When I build app in Unity, then bridge to Android, I can use sensor motion listener to detect this (because Unity makes library for Android App, then I can control on native Android).

But when I use X-Code for iOS, I don't know how to control it by gencode from Unity.

So I think I need control it thow Unity. Can anyone help me? :(

Regards,

Thanks!

Camera motion detect

April 28, 2015 - 10:10pm #8

HI All, Can i get any solution to reverse the camera rotation ? 

Is there any chance to change the camea rotation ? (if i move right side of the marker tracker should move right side. if i move left side of marker, tracker should move left side) ? means reverse the camera left/right movements ?

Thanks in Advance !!!

 

Camera motion detect

April 27, 2015 - 9:34pm #7

Very thanks for your Hint.

Is there any chance to change the camea rotation ? (if i move right side of the marker tracker should move right side. if i move left side of marker, tracker should move left side) ? means reverse the camera left/right movements ?

Thanks in advance !!!

vamshi

Camera motion detect

April 27, 2015 - 8:23am #6

Tracking object size is changing without background. 

I guess this is expected; if your requirement is to show a "smaller" augmentation object when you get close to the target and a "larger" augmentation object when you get far from the target, the augmentation will not be "in-sync" with the video background, as the background simply shows what the real camera sees (so, real objects in the camera view will appear smaller when getting far from them in the real world).

 

If you want to also change the way the video background appears, then you may need to dynamically rescale and/or reposition the video background plane according to your own custom logic;  you can probably do this by addin a custom script to the Background Plane game object under the ARCamera;

for instance, you could use the LateUpdate() method to reset the transform.position and/or the transform.localScale of that object; the LateUpdate() method in Unity is executed after the Update() method of MonoBehaviour.

see:

http://docs.unity3d.com/ScriptReference/MonoBehaviour.LateUpdate.html

 

 

 

Camera motion detect

April 27, 2015 - 5:46am #5

Tried as your suggestion. Tracking object size is changing without background. Our client is not happy with this. 

This is not giving real augmentation feel. 

Is there any other way to reverse the motion of camera ?

Also

Is there any chance to change the camea rotation ? (if i move right side of the marker tracker should move right side. if i move left side of marker, tracker should move left side) ? means reverse the camera left/right movements ?

Thanks in advance !!!

vamshi

 

Camera motion detect

April 15, 2015 - 6:05am #4

@ vamshi,

you can achieve this by dynamically setting the localScale of the Transform component of your 3D object (your augmentation object); this can be done in Unity by attaching a script to the gameObject in question and setting its transform.localScale to a Vector3 value of your choice;

the scale value can be computed based on the distance between the gameObject and the Camera; such distance can be computed from the diff vector between the object world position and the Camera world position.

There may be other (similar) techniques to achieve the same, but the underlying idea should be similar to the above; see also:

http://docs.unity3d.com/ScriptReference/Transform.html

 

Camera motion detect

April 14, 2015 - 10:48pm #3

Hi All,

Unity3d 4.6.3 + Vuforia 4-0-103 we are using.

We have a project which is something different than general AR project.

In General, On Augmentation if we come closer to Tracker, Augmented object looks bigger. As well as if we go far from the tracker Augmented object looks smaller.

But in my project i need to implement like this : If i go far from the Tracker Augmented object should apper bigger and if i come closer to tracker Augmented object should appear small.

How to reverse the camera motion with Vuforia 4.0 version.

Can anyone help ?

Thanks & Regards,

vamshi

Camera motion detect

January 20, 2014 - 1:59am #2

Hi, I understand your problem, but I think it does not relate to Vuforia; this is a more general issue on how to use sensors in iOS via Unity + XCode integration.

My recommendation is to search in the Unity web site/ forums.

 

Log in or register to post comments