Topic locked

Camera Position issue

March 6, 2015 - 2:30am #1

I've finished my project and all works fine but now upgraded to vuforia 4 but it has some issues. when i detect the model, it's augmenting the data and i've the option for load the 3d model without marker. So, when i load the model it's not showing on the camera but the position is changed some where because of ARCamera. Prevous version i reset the ARCamera position by called below code but now it's not working. Please check the attached images.

Camera.main.transform.position=new Vector3(-0.0691304f, 0.5530434f, 3.2f);
Camera.main.transform.rotation=Quaternion.Euler(0, 180, 0);
 

Camera Position issue

March 7, 2015 - 12:55am #6

Great.

Camera Position issue

March 6, 2015 - 9:30pm #5

I've done it and it's working fine. I changed the ARCamera position and when load the model i set the camera position then it works fine..Thanks

Camera Position issue

March 6, 2015 - 11:34am #4

The ARCamera object in Vuforia 4.0 is not a camera, it is just an empty game-object which has a Child camera (so, ARCamera is not the same as "Camera.main");

you probably want to change your scripts to set the ARCamera position, instead of "Camera.main".

Also, if you want to display a 3D model in the camera view when there is no marker/target tracked, a better and easier way is to make the Model a child of the Camera and use local coordinates with respect to the parent camera, i.e. use transform.localPosition and transform.localRotation;

for example, you could place a 3D model right in front of the Camera (centered in the view) by making it a child of the Camera and setting the model position as:

model.transform.localPosition = new Vector3(0, 0, SomeDistance);

 

 

 

Camera Position issue

March 6, 2015 - 10:10am #3
In vuforia 3 version ARCamera i setted the camera position is like attached ARCamera_Pos image and i tracked the image the ARCamera values are changing and i've a close button on top, see the close button image. Then press that image i'm resetting the ARCamera values into initial values using below code of camera trasnform. And i've option for load the model without marker, here i'm using button for load the category and model, when i load the 3d models without marker, it's loading fine and it's showing the camera see attached image 3D Model image.
 
In vuforia 4, i setted the ARCamera and child Camera position as same like as in vuforia 3 but after tracking the image the ARCamera position is chaning and when i press the close button i can't set initial value of ARCamera. After i load the 3D model without tracker the model is not showing on the camera but it's in the view but because of the ARCamera position it's not loading proper. see the attached image only the fb, close, zoom button showing on the camera and the chair is not showing. See model_not_appear image
 
The code for reset the camera position to initial position:
 
Camera.main.transform.position=new Vector3(-0.0691304f, 0.5530434f, 3.2f);
Camera.main.transform.rotation=Quaternion.Euler(0, 180, 0);
 
 
 
 
AttachmentSize
Image icon ARCamera_Pos.JPG43.19 KB
Image icon closeButton.JPG91.2 KB
Image icon modelload_withoutmarker.JPG123.57 KB
Image icon Model_Not_Appear.JPG111.26 KB

Camera Position issue

March 6, 2015 - 9:14am #2

Could you clarify what you mean with "now it's not working" ?

What should be the expected behaviour of the App ?

for example, could you provide a screenshot of how the model should look like in the "correct" version of your App, and show the comparison between the expected behaviour and the actual (incorrect) one ?

 

 

Topic locked